3

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.

2 Answers 2

3

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

1
  • 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 May 10, 2011 at 6:40
2

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .