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 library is provided as open source software using a BSD license.
Static content, such as an OS kernel or video game assets, is compressed once, then read from storage, and decompressed while it is read.
Each bar measures, for instance for lz4 -9 :
lz4 -9 -c silesia.tar > f.lz4 LINK < f.lz4 | lz4 -d -c > /dev/null
where LINK limits the speed of the storage device
(see bench-pipeline.sh).
Dynamic content, such as network packets, RPCs or database replication, is compressed, sent over the network, and decompressed, the three at the same time.
Default settings, or a single compression thread.
By default, on this system, lz4 compresses with 6 threads, pigz with 8, zstd with 2,
gzip and lzop with 1.
A single thread : lz4 -T1, zstd -T1, pigz -p 1.
Each bar measures, for instance for lz4 -1 :
lz4 -1 -c < silesia.tar | LINK | lz4 -d -c > /dev/null
where LINK limits the speed of the network
(see bench-pipeline.sh).