Comparing gzip, bzip2, lzma
Most of you maybe never ever heard about lzma compression. It’s less popular than zip, gzip, or even bzip2. But how about 7-zip compression ?? yes, you may heard of it. It actually the famous implementation of lzma. After do some google, most of it says that lzma can reduce file size smaller than (even) bzip2. So it came to my curiosity comparing gzip2, bzip2, lzma.

Actually my will to compare lzma with gzip and bzip2 get stronger after my brother proved me that lzma can reduce file size smaller than bzip2. Well actually my brother only test it with 1 (one) pdf file, so I will prove it which can compress smaller. I will test it with text, image (png & svg), binary, movies and also mixed from all those files. And also I will use the best compression options.

The test machine is my sandbox machine. This is the spesification, and the :
debian etch 4.0 (2.6.18-6-xen-vserver-686)
2 x Intel Xeon Intel(R) Xeon(R) CPU 3040 @ 1.86GHz
1GB RAM (I have to shutdown all my domU to get 1GB back T_T )

The software version
gzip 1.3.5-15
bzip2 1.0.3-6
lzma 4.43-5

First Test (text files)

The first test is with a text file. For more dramatic I take the 2 files from my log files which has 656 MB and 60MB size. Well can you imagine how long the text will be with those size? :D . Ok here’s the test result :
Continue reading