Simple test of several compression algorithms

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.