LZ4 is a lossless compression algorithm, providing compression speed greater than 500 MB/s per core. It features an extremely fast decoder, with speed in multiple GB/s per core. LZ4 can work with Zstandard to allow both algorithms to compress data faster.
lz4 - Compresses or decompresses files using the LZ4 formatlz4c - Compresses files using the LZ4 format (link to lz4)lz4cat - Lists the contents of a file compressed using the LZ4 format (link to lz4)unlz4 - Decompresses files using the LZ4 format (link to lz4)liblz4.so - The library implementing lossless data compression, using the LZ4 algorithm# Compress a file
lz4 file.txt file.txt.lz4
# Decompress a file
lz4 -d file.txt.lz4 file.txt
# Compress output of a command
tar -cf - /path/to/directory | lz4 > archive.tar.lz4
# Decompress to pipe
lz4 -d archive.tar.lz4 | tar -xf -
The LZ4 library can be used in C/C++ applications to provide fast compression and decompression capabilities.
LZ4 is designed for speed-critical applications where compression ratio is secondary. It offers:
This package is distributed under the BSD 2-Clause License.