I've noticed bzip2 gives a little bit better compression than gzip. So...I'm curious...what's gives the best compression out of all the compression utilities?
Thanks!
I've noticed bzip2 gives a little bit better compression than gzip. So...I'm curious...what's gives the best compression out of all the compression utilities?
Thanks!
Since I didn't specify earlier...I meant free utilities.
A couple of points -
gzip -9 tells the program to compress as much as possible
zip, gzip, etc all use the same algorithms, so there won't be huge differences. Also, one idea is to try to 'uncompress' a file made by another compressor - at least make it feasible.
In my experience, bzip2 is usually (but not always) better with compression. gzip is my favorite, though. It faster in many cases, and compresses well enough for me.
I do think that zip, gzip, compress, and bzip2 are all different algorithms, though. I know that GNU Zip (gzip) was written specifically because the algorithm in the "compress" program wasn't "free" in the FSF meaning of the word. I was also under the impression that Zip, although it may have been based on the same mathmatics as "compress", was written independently - as was bzip2.
Check the man pages, at least for gzip and bzip2. If I remember correctly, there is some discussion of the algorithm implementation within.
pack -- Huffman coding
compact -- adaptive Huffman coding
compress -- adaptive Lempel-Ziv aka Lempel-Ziv-Welsh aka modified Lempel-Ziv aka LZW
gzip -- Lempel-Ziv
bzip2 -- Burrows-Wheeler
This page compares gzip with bzip2. bzip2 will almost always result in a smaller file at a tremendous cost of cpu time. bzip2 might make sense if you're downloading a very large file across a 56k dailup or something...other than that, I'd stick with gzip.
Thanks for all the useful information!!
Perderabo was right. I was quoting from an old document from an ACM meeting where they were trying to get compression utilities to work on different file formats.
Sorry.