Compression

LZ4 – lossless data compression algorithm focused on compression and decompression speed

LZ4 is a lossless compression algorithm, providing compression speed > 500 MB/s per core (>0.15 Bytes/cycle).

It features an extremely fast decoder, with speed in multiple GB/s per core (~1 Byte/cycle). A high compression derivative, called LZ4_HC, is available, trading customizable CPU time for compression ratio.

LZ4 is an LZ77-type compressor with a fixed, byte-oriented encoding. There is no entropy encoder back-end nor framing layer. The latter is assumed to be handled by other parts of the system (see LZ4 Frame format). This design is assumed to favor simplicity and speed. It helps later on for optimizations, compactness, and features.

LZ4 is also compatible with dictionary compression, both at API and CLI levels. It can ingest any input file as dictionary, though only the final 64KB are used. This capability can be combined with the Zstandard Dictionary Builder, in order to drastically improve compression performance on small files.

Compression can be done in: a single step (described as Simple Functions), a single step, reusing a context (described in Advanced Functions), and unbounded multiple steps (described as Streaming compression).

LZ4 library is provided as open source software using a BSD license.

Website: lz4.github.io/lz4
Support: GitHub Code Repository
Developer: Yann Collet
License: BSD 2-Clause license

LZ4 is written in C. Learn C with our recommended free books and free tutorials.


Related Software

Compression Tools
LZ4Focused on compression and decompression speed
ZstandardFast compression algorithm, providing high compression ratios
brotliGeneric-purpose lossless compression algorithm
lzopFile compressor favoring speed over compression ratio
pigzParallel implementation of gzip
ouchCLI tool for compressing and decompressing for various formats
pixzParallel, indexed xz compressor
gzipProvides the standard GNU file compression utilities
BZip3Spiritual successor to BZip2
bzip2Freely available, patent free, high-quality data compressor
PBZIP2Parallel implementation of bzip2
lrzipAchieve very high compression ratios and speed when used with large files
lbzip2Multi-threaded implementation of bzip2, suited for serial and parallel processing
ZXCHigh-performance lossless compression library and command-line tool
plzipMassively parallel lossless data compressor
p7zip-zstdp7zip fork with additional codecs and improvements
7-ZipFile archiver with a high compression ratio
ncompressFast, simple LZW file compressor
PXZRuns LZMA compression on multiple cores and processors
crabzLike pigz but written in Rust
LzipLossless data compressor aimed at Unix-like systems
cmixOptimize compression ratio at the cost of high CPU/memory usage
lrzip-nextLong Range ZIP
rapidgzipParallelized decompression of gzip files
igzipCommand-line compression and decompression utility

Read our verdict in the software roundup.


Best Free and Open Source Software Explore our comprehensive directory of recommended free and open source software. Our carefully curated collection spans every major software category.

This directory is part of our ongoing series of informative articles for Linux enthusiasts. It features hundreds of detailed reviews, along with open source alternatives to proprietary solutions from major corporations such as Google, Microsoft, Apple, Adobe, IBM, Cisco, Oracle, and Autodesk.

You’ll also find interesting projects to try, hardware coverage, free programming books and tutorials, and much more.

Discovered a useful open source Linux program that we haven’t covered yet? Let us know by completing this form.
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted