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 ...