Posts Tagged gzip
Compression Tools: lzma, bzip2 & gzip
Posted by havan in OpenSource on May 11th, 2009
Today I was taking a regular backup of our server in the office. After I collect all the files, I tried to burn them to a DVD and see that 4.4GB DVD is ~50MB short. I did not want to burn another DVD for a 50MB, so decided to zip the Zimbra backup file, which is 2.5GB in size. I choose lzma because I’ve read somewhere that its ratio is better that others. But that was clearly a bad decision!
Compression took ~50 minutes. Despite the small file size of ~750MB, didn’t worth it because of the very long compression time. So I decided to make a small compression tools test. I have used a 355MB svn dump backup file. Here are my results* with lzma, bzip2 and gzip;

Compression test results (lower is better)
So, with a little loss in compression ratio, gzip performs much faster. Of course, I know that this chart would be different if the input file, svn dump, is a different type of file or size. But I use to backup mainly this kind of text based files, so this works for me.
* Test system: Intel(R) Core(TM)2 Duo T5750 (2.00GHz) CPU, 2GB ram, Pardus 2008 (Linux 2.6.25.20-114) OS, lzma sdk 4.32, bzip2 1.0.5, gzip 1.3.12, default settings used for all tools.