Practical Compressor Test

Introduction

Welcome to the 'Practical Compressor Test' page. Unlike some other compressor comparison sites, I won't be looking for a compressor offering for the last bit of compression. Instead I'll try to find the most practical compressor out there. This means compression/decompression times are taken into account, so PAQAR and the like, which can achieve very good compression at the expense of insanely long run times (several hours on this benchmark!) are not considered.

Instead I'll be focusing on very well known, established compressors that are easily obtained (I only use precompiled packages and won't build from source) and have reasonable run times. Also I won't try every combination of compression options but limit the test to one general option (-1 to -9 for gzip and bzip2, -m1 to -m5 for RAR, ...).

News

2007/04/25Updated 7-zip to version 4.45: small improvements in speed and compression ratio
2006/06/08Reran all tests on a Pentium D 830 (dual-core, 3 GHz, 2x 1MiB L2) and 2 GiB RAM
2006/02/13Updated 7-zip to version 4.33: both faster compression (up to 20%) and better compression ratios (a few %)
2005/11/27Updated 7-zip to version 4.30 beta: high compression (-mx=7 ... -mx=9) is now up to 40% faster
2005/11/03Updated 7-zip to version 4.29 beta: no changes
2005/04/12Updated 7-zip to version 4.16: the ratio is the same, but compression and decompression are now 30% to 40% faster!
2004/11/10Added the 7-zip compressor
2004/09/30Added the lzop compression algorithm

The Test

Just like Johan De Bock's excellent GIMP Source Compression Test I'll be using the GIMP 2.0 Source tarfile:
The test file: GIMP 2.0.0 Sources as one TAR
MD5-Hash: d2a1c33317fb57bbed3641671b2da163
Total size: 78,745,600 Bytes

Each program is used to compress and decompress the file with each of the selected command line switches. The time required for both compression and decompression is measured, as is the size of the resulting archive. To have an idea of the accuracy of the timing measurements, the test is repeated three times and the minimum runtime (= the one with the least disturbances) is reported. All this is done on a Pentium D 830 (3.0 GHz) processor with 2 GiB RAM, running Fedora Core 5 Linux. Only one CPU is used for the tests (using -mmt=off for 7-zip, default for other compressors).

The Contenders

NameVersionSwitches
gzip1.3.5-1 ... -9
bzip21.0.3-1 ... -9
RAR3.60b2-m1 ... -m5
Zip2.31-1 ... -9
(N)compress4.2.4(none)
7-zip4.42-mx=1 ... -mx=9
lzop1.02rc1-1 ... -9
Zoo2.1(none) and -h

The versions aren't always the latest and the greatest, but they are - again in the spirit of being 'practical' - the most recent ones installed by the Fedora Core 5 distribution.

Results - graphs

These graphs show the results for the various compressors and their switches. Compression and decompression time, respectively, are in the horizontal axis, compression efficiency (compressed size / original size, so smaller is better) is on the vertical axis.

Compression Decompression

Conclusions

Ranking

As we have already seen, your ideal compressor will depend on what you use it for. This ranking can be customized to what you want to do. It will compute the time required for 1 compression, a number of downloads over a network and the following decompressions.

total time = compression time + n * (compressed file size / network speed + decompression time)

For instance, if you compress a file to send it over a network once, n equals one and compression time will have a big influence. If you want to post a file to be downloaded many times, n is big so long compression times will weigh less in the final decision. Finally, slow networks will do best with a slow but efficient algorithm, while for fast networks a speedy, possibly less efficient algorithm is needed.
  • One compression
  • Network speed: kbps or 0 for infinite speed (i.e. no network transmission time is counted)
  • download/decompression cycle(s), or -1 for only download/decompression (i.e. no compression time is counted)
Network speed: 1000 kbps    Downloads/decompressions: 1
green
red
rar
-m2
green
red
rar
-m3
blue
green
red
7za
-mx=3
blue
green
red
rar
-m4
blue
green
red
rar
-m5
blue
green
red
bzip2
-9
blue
green
red
bzip2
-8
blue
green
red
bzip2
-7
blue
green
red
bzip2
-6
blue
green
red
bzip2
-5
blue
green
red
7za
-mx=5
blue
green
red
bzip2
-4
green
red
rar
-m1
blue
green
red
bzip2
-3
blue
green
red
7za
-mx=1
blue
green
red
bzip2
-2
green
red
zip
-6
green
red
gzip
-6
green
red
zip
-5
green
red
gzip
-7
green
red
zip
-7
green
red
gzip
-5
green
red
gzip
-8
green
red
zip
-8
green
red
zip
-4
green
red
gzip
-4
blue
green
red
bzip2
-1
green
red
gzip
-9
blue
green
red
7za
-mx=9
green
red
zip
-9
blue
green
red
7za
-mx=7
green
red
zip
-3
green
red
gzip
-3
green
red
zip
-2
green
red
gzip
-2
green
red
zip
-1
blue
green
red
gzip
-1
green
red
lzop
-7
blue
green
red
zoo
h
green
red
lzop
-8
green
red
lzop
-9
green
lzop
-1
green
lzop
-3
green
lzop
-4
green
lzop
-6
green
lzop
-5
green
lzop
-2
green
red
compress
-f
green
red
zoo
q

red Compression time    green Transmission time    blue Decompression time

Optimal compressors

For any bandwidth / #downloads combination we can now determine the optimal compressor.
Best Best (free)

Related sites

Feedback

For any comments, good or bad, mail me at wim@heirman.net !

Results - table

AlgorithmEffortCompression time (s) Decompression time (s)Compression ratio
gzip-12.61.827.7%
 -22.81.726.7%
 -33.21.726.0%
 -43.91.624.5%
 -54.71.623.8%
 -66.21.523.4%
 -77.31.523.3%
 -810.91.523.2%
 -913.31.523.2%
bzip2-118.48.421.2%
 -219.17.419.9%
 -319.97.019.1%
 -421.06.918.4%
 -522.16.717.9%
 -623.86.517.5%
 -723.96.417.2%
 -824.86.416.9%
 -926.06.216.8%
rar-m14.01.422.1%
 -m217.41.014.5%
 -m325.41.013.4%
 -m427.911.613.1%
 -m531.112.812.5%
zip-12.81.027.7%
 -23.00.926.7%
 -33.50.926.0%
 -44.10.924.5%
 -55.00.923.8%
 -66.70.823.4%
 -78.00.823.3%
 -812.00.823.2%
 -914.70.823.2%
7za-mx=114.04.420.8%
 -mx=315.73.415.7%
 -mx=565.12.712.1%
 -mx=787.82.611.5%
 -mx=988.22.511.2%
lzop-10.91.134.1%
 -20.91.134.3%
 -30.91.034.3%
 -40.91.034.3%
 -50.91.134.3%
 -60.91.034.3%
 -713.30.826.6%
 -827.60.826.3%
 -931.40.826.3%
compress-f3.41.237.8%
zooq4.81.440.6%
 h23.52.025.8%


Valid XHTML 1.0!