LZ4
Also known as: LZ4 compression, .lz4 file, fast compression
LZ4 is a lossless compression algorithm built for extreme speed rather than the smallest size. It compresses and decompresses very fast, which makes it popular inside filesystems, databases, and real-time systems.
- Lossless algorithm optimized for speed, not ratio
- Used in filesystems, databases, and real-time systems
- Lower compression than gzip or xz, but much faster
Speed over ratio
LZ4 deliberately trades compression ratio for speed. It does not shrink data as much as gzip or xz, but it packs and unpacks far faster, with very low CPU cost.
That balance makes it ideal where throughput matters more than saving every byte — for example, compressing data on the fly.
Where you meet LZ4
LZ4 is used inside filesystems (such as ZFS), databases, game engines, and memory/transport compression rather than as a typical download format. You may see standalone .lz4 files, openable with the lz4 tool or 7-Zip builds that support it.
For maximum size savings on an archive, a slower algorithm like xz or zstd is a better fit.