Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

free non-gpl data compression libraries

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.

like image 831
f0b0s Avatar asked Aug 31 '09 23:08

f0b0s


People also ask

Is ZSTD lossless?

Zstandard, commonly known by the name of its reference implementation zstd, is a lossless data compression algorithm developed by Yann Collet at Facebook.

Is ZSTD open source?

Zstandard library is provided as open source software using a BSD license. Its format is stable and published as IETF RFC 8878.

What is the fastest compression algorithm?

The fastest algorithm, lz4, results in lower compression ratios; xz, which has the highest compression ratio, suffers from a slow compression speed.

How does snappy compression work?

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”.


3 Answers

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.

like image 171
Greg Hewgill Avatar answered Oct 21 '22 06:10

Greg Hewgill


I think 7zip is public domain. LZMA compression.

7-Zip

like image 27
KFro Avatar answered Oct 21 '22 05:10

KFro


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

like image 42
James Snyder Avatar answered Oct 21 '22 04:10

James Snyder