A test suite for general purpose lossless data compressors. https://code.ivysaur.me/compression-performance-test
This repository has been archived on 2021-04-12. You can view files and clone it, but cannot push or open issues or pull requests.
Go to file
2016-09-24 00:00:00 +00:00
dist-archive commit all archived files 2016-09-24 00:00:00 +00:00
doc commit all archived files 2016-09-24 00:00:00 +00:00
.legacy-codesite.toml initial meta commit 2016-09-24 00:00:00 +00:00
README.md commit all archived files 2016-09-24 00:00:00 +00:00

compression-performance-test

A test suite for general purpose lossless data compressors.

This project contains a set of scripts to compare various compression software, with a target metric of maximising the compression ratio for a given compression speed. Decompression speed and memory usage were not tested.

Test Environment

This project also includes a sample output, tested on an Intel Sandy Bridge desktop PC under Cygwin64.

The tested compressors are (in alphabetical order):

  • brotli (compiled from git head on cygwin64)
  • bzip2 (version 1.0.6, from cygwin64 package manager)
  • cat
  • gzip (version 1.7, from cygwin64 package manager)
  • lz4 (1.7.2, compiled from git on cygwin64)
  • lz5 (1.5.0, compiled from git on cygwin64)
  • rar (5.4.0 windows64 evaluation binary)
  • xz (5.2.2, from cygwin64 package manager)
  • zpaq (7.15, compiled from release archive on cygwin64)
  • zstd (1.1.0, compiled from git for mingw-w64)

The test corpus files are:

Test Results

  • cat always provides the fastest compression.
  • zpaq always provides the best compression ratio, always at the slowest compression time. If you have infinite time to compress data and simply want the best ratio, you should always choose zpaq.

Otherwise, there's a frontier between these two extremes (Matt Mahoney, the author of zpaq, refers to this as a Pareto Frontier). Along this frontier, different compressors 'win' or 'lose', depending both on time requirements and both the data content.

The test file, listed with its time/ratio optimal compressors:

  • debian-security-tracker-20160924.json: cat > lz4/lz5 (briefly) > zstd > brotli > zpaq.
  • helloworld.exe: cat > lz4/lz5 (briefly) > zstd > brotli > xz (punctuated with rar) > zpaq.
  • openftp4_all_20160918.log: cat > lz4/lz5 (briefly) > brotli (briefly) > zstd (over a large range of times) > bzip2 (surprisingly) > zpaq.
  • veekun-pokedex-20160328.tar: cat > lz4 > zstd > xz (over a large range of times) > zpaq.

Observations:

  • The only time rar made an optimal showing was during the .exe test. This probably demonstrates use of custom filters for specific file formats.
  • gzip was always outclassed at every level.
  • lz4/lz5 have an advantage at very low compression levels (e.g. -2/-3) but are immediately outclassed for the entire rest of their range.
  • bzip2 takes a very similar amount of time to compress, regardless of the target compression ratio.
  • The internet community seems to consider bzip2 obsolete in favour of xz. This might be true in general, but there are still cases where bzip2 shines above it.
<html>




</html>

Changelog

2016-09-24 v1