Heard LZ4 name, long ago wanted to compare it with the compression algorithm such as ZLib. This simple test came late, but at least (temporarily) I was on my mind.
Originally I only planned to test for ZLib, LZ4 and Snappy, but here LZ4 HC (r129) aroused my great interest, so also by the way, will LZ4HC, as well as Synlz (a variant of the LZ series, originated here) to join the test list.
The compression algorithm versions are as follows.
zlib:1.2.8,
LZ4 and LZ4 hc:r129
snappy:1.1.3
synlz:1.18
Tested all types of files including plain text, bitmaps, and the results are as follows:
As a result of these tests alone, ZLIB is almost absolutely at the bottom of the decompression rate (even if Intel has a PPL offering to improve its performance), but the compression ratio is no doubt optimal, while LZ4 HC is closest to ZLib in terms of compression, but the decompression speed is dozens of or even a hundredfold-in some scenarios, It may be a more desirable (compromise) compression scheme.
and Synlz and Snappy, probably my test cases are not their ideal application scenario, compared to LZ4 and LZ4 HC, the results are not ideal.
Simple test of several compression algorithms