Os arquivos bz são diferentes de bz2 e como fazer arquivos bz em vez de bz2?

1

Os arquivos bz são diferentes de .bz2? Eu estou supondo que bz2 é o sucessor de bz e talvez eles usem algoritmos de compressão diferentes ou são essencialmente sufixos de nomes de arquivos que significam a mesma coisa?

bzip2 (1) aparentemente não menciona a diferença entre arquivos bz e bz2, mas menciona isso:

bunzip2 (or bzip2 -d) decompresses all specified files. Files which were not created by bzip2 will be detected and ignored, and a warning issued.

bzip2 attempts to guess the filename for the decompressed file from that of the compressed file as follows:

    filename.bz2    becomes   filename
      filename.bz     becomes   filename
      filename.tbz2   becomes   filename.tar
      filename.tbz    becomes   filename.tar
      anyothername    becomes   anyothername.out

* Os arquivos bz são diferentes dos arquivos bz2? Se sim, como fazer arquivos bz?

    
por direprobs 22.06.2017 / 17:36

1 resposta

3

Eles são diferentes. bzip2 foi uma versão reescrita de bzip , retrabalhada para evitar possíveis problemas de patente com o% original bzip . A página antiga tem detalhes:

bzip2 is a rewritten and re-engineered version of 0.21. It looks superficially fairly similar, but has been almost entirely re-written (several times :-). The important differences are:

  • Patent-free! (I hope; see statement above). bzip-0.21 used arithmetic coding; bzip2 uses Huffman coding, which is generally regarded as non-problematic from a patent standpoint. Both programs are based on the Burrows-Wheeler transform, but, to the best of my knowledge, that's not patented either.

  • Faster, particularly at decompression. bzip2 decompresses more than 50% faster than 0.21, mostly because of the use of Huffman coding. I've also improved the compression speed, although not that much -- perhaps it compresses 30% faster than 0.21.

  • Recovery from media errors. Both programs compress data in blocks, by default, 900k long. With bzip2, each block is handled completely independently, carries its own checksum, and is delimited by a 48-bit sequence. So, if you have a damaged compressed file, bzip2 can extract the compressed blocks, detect which ones are undamaged, and decompress those.

  • Test mode. You can test integrity of compressed files without having to decompress them. I should have put this in 0.21, really, but was too lazy (+ burnt-out with hacking by the time I released it).

  • Handles very repetitive files much better. Such files are a worst-case for any block-sorting compressor. bzip2 runs approximately ten times faster than 0.21 for such files.

  • Support for smaller machines. bzip2 can decompress any file it creates in 2300k, which means you can decompress files on 4-meg machines. Peak memory use during compression is also reduced by about 900k compared with 0.21, to around 6400k.

  • Better flag handling. In particular, long flags (--like --this) are supported, which makes it easier to use.

  • The one-line startup message which 0.21 printed, is gone. This was 0.21's most complained-about feature. It even bugs me nowadays.

Para criar arquivos bz , você precisa obter o antigo compressor bzip e usá-lo. Não há motivos reais para isso ...

    
por 22.06.2017 / 17:50

Tags