views:

626

answers:

5

What is the best unix compression utility available?

A: 

bzip is pretty efficient, spacewise, but not as fast as some of the others.

From "man bzip2":

bzip2 compresses files using the Burrows-Wheeler block sorting text compression algo‐ rithm, and Huffman coding. Compression is generally considerably better than that achieved by more conventional LZ77/LZ78-based compressors, and approaches the performance of the PPM family of statistical compressors.

Jeremy Smyth
+5  A: 

depends on your speed/size tradeoff. Gzip is fast and yields good results. Bzip2 is slow and often yields better results.

Ben Hughes
A: 

http://www.linuxjournal.com/article/8051

http://tukaani.org/lzma/benchmarks

Pick the best per your needs. The graphs in the first link comprehensively cover every Unix compression utility I've heard of. The second one offers some hard numbers from the more common untilities.

I tend towards lzma -2 when doing large backups, which offers smaller AND faster compression than bzip -9.

Autocracy
+2  A: 

A good compression utility is 7-zip (p7zip on linux) using the lzma-algorithm (slow compression, good decompression speed, very good compression ratio). Can decompress most popular archive-formats.

You can also look at compression benchmark sites:

bill
A: 

XZ compression is a relative newcomer, but is a good balance between compression and speed. Supposedly almost as good compression as bzip2, but only slightly slower than gzip.

Steve Baker