Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm comparing compression functions, and I'm surprised by what I'm seing. Maybe I'm doing something wrong, but everything I've tested has been more compressed by gzip than bzip2!

I was under the impression that bzip2 was better than gzip. Can someone give an example of data that would demonstrate this? Thanks.

share|improve this question

2 Answers 2

up vote 3 down vote accepted

gzip is stream-oriented, bzip2 is block-oriented. You will need several tens of kilobytes before you see an advantage with bzip2.

share|improve this answer
    
Additionally, there's also "pbzip2" (the "p" is for "parallel") which takes advantage of multiple processors (by using "pthreads") for additional performance gains: compression.ca/pbzip2 –  Randolf Richardson May 10 '11 at 6:40

One example of many - the Linux kernel 2.6.11.0 source tarball. See http://tukaani.org/lzma/benchmarks.html for more.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.