Rank #09 · Daily · Infra
lz4: Extremely Fast Lossless Compression Library
When you need compression that stays out of the way of RAM and CPU — LZ4 prioritizes speed, with an HC mode when you can trade cycles for ratio.
What it does
LZ4 is a lossless compression algorithm and the reference C library + CLI maintained at lz4/lz4 (homepage lz4.org). From the README:
- Speed-first. Claims compression > 500 MB/s per core (scalable with cores) and decompression in multiple GB/s per core, often approaching RAM bandwidth on multi-core hosts. An acceleration factor trades ratio for even faster encode; LZ4_HC flips the trade for better ratio at the same decompress speed.
- Dictionary compression at API and CLI (
-D) levels — last 64 KB of a dictionary file; can pair with Zstandard's dictionary builder for small-file workloads. - Formats. Raw block format plus framed multi-block streams for interoperable long files; APIs in
lz4.h/lz4hc.h/lz4frame.h. - Build. Classic
make/make install, plus CMake, Meson, Visual Studio underbuild/, and a vcpkg port. - Ports. Many language bindings exist; the homepage maintains a port list. Distros commonly package both
liblz4and thelz4CLI.
License split (important): the library is BSD 2-Clause; the lz4 command-line utility is GPL-2.0-or-later. GitHub's API reports NOASSERTION / Other for dual-license trees — body follows the gate dual-license wording: BSD-2-Clause OR GPL-2.0-or-later depending on which artifact you ship.
The README's lzbench table (LZ4 v1.11.0 vs Snappy, Zstd, zlib, etc. on Silesia Corpus / i7-9700K) is author-published — TidyHow has not re-run it. Cite as upstream benchmark only.
Who it's for
- Systems and infra engineers embedding a fast compressor in databases, message buses, filesystems, game assets, or telemetry pipelines.
- Teams that already know Zstd/Snappy and want the decode-speed / low-latency end of the spectrum.
- Packagers and language-runtime maintainers who need a stable C reference.
If maximum compression ratio is the only goal, Zstd or xz-class codecs usually win — LZ4's job is staying cheap.
Stars / language / license
12,387 stars · C · BSD-2-Clause OR GPL-2.0-or-later
Data verified: 2026-11-06 09:09 Asia/Shanghai (GitHub API get_repository + README; API license=Other/NOASSERTION — body uses gate dual-license: library BSD-2-Clause, CLI GPL-2.0-or-later)
Trending note: +23 stars today (Trending selection captured 09:06 Asia/Shanghai)
Category tags
Infra · compression · C · lossless · systems · library · CLI
How it differs from similar projects
Compared with Zstandard. Zstd typically wins on ratio at similar "fast" levels; LZ4 usually wins when absolute encode/decode latency and simplicity matter more than a few extra percent of size. They are often used together in the same ecosystem (dictionaries, tooling).
Compared with Snappy / LZO / LZF. Same "fast over dense" neighborhood. LZ4's README positions itself as faster on the published lzbench slice — verify on your own corpus and CPU.
Compared with zlib / gzip. Higher ratios possible with deflate; much slower. LZ4 is the opposite trade.
Why it still trends. Mature C reference, ubiquitous packaging, active maintenance (pushed_at current at verification), and a perennial fit for modern infra where CPU is scarcer than disk. Daily star growth is small; presence on the daily list reflects continued baseline interest, not a viral spike.