i'm writing project that stores data, so i need to compress it. I've tried zlib but it's bottleneck of my project. So maybe there is faster solution. I don't need a great compress ratio, but i'm looking for really fast compression. Are there any other data compression libraries except zlib, that are really free and can be used in proprietary software (project, i'm working on, isn't GPL-based). My project is on C++ and I need to compress char* arrays of text.
Zstandard, commonly known by the name of its reference implementation zstd, is a lossless data compression algorithm developed by Yann Collet at Facebook.
Zstandard library is provided as open source software using a BSD license. Its format is stable and published as IETF RFC 8878.
The fastest algorithm, lz4, results in lower compression ratios; xz, which has the highest compression ratio, suffers from a slow compression speed.
The high compression speed is achieved by losing on the compression ratio, the resulting output being 20-100% larger than that of other libraries, Snappy having a compression ratio of “1.5-1.7x for plain text, about 2-4x for HTML, and of course 1.0x for JPEGs, PNGs and other already-compressed data”.
A very fast compression algorithm is LZO. Benchmarks on the site show that decompression is comparable in speed to memcpy()
.
The free version of LZO is GPL licensed, but there is also a commercial version of the library in LZO Professional. Also, from the documentation:
Special licenses for commercial and other applications which are not willing to accept the GNU General Public License are available by contacting the author.
I think 7zip is public domain. LZMA compression.
7-Zip
Here are a few:
FastLZ -- fast and lightweight, MIT license unless you want to use it under a GPL license
LZJB -- also fast and pretty lightweight, used as default compression algorithm for Sun's ZFS
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With