Zstandard (zstd) is a lossless compression algorithm with a C library and a command-line tool for .zst and other formats. It targets real-time speeds with configurable ratio-versus-speed trade-offs and optional training dictionaries for small data.
Overview
Zstandard, often called zstd, is a compression system designed for high-speed lossless packing at ratios competitive with zlib while keeping decompression speed stable across settings. The published format is documented in RFC 8878, and the reference open-source deliverable includes libzstd and a utility that compresses and decompresses .zst files as well as interacting with .gz, .xz, and .lz4 in the CLI description.
Negative compression levels via --fast settings favor speed over ratio, while higher levels spend more CPU for denser output without materially slowing decompression, alongside benchmark tables on Linux desktop and server hardware. For many small independent records, a training mode builds a custom dictionary from sample files so compressing kilobyte-scale payloads improves dramatically.
Building uses the root Makefile to produce the CLI and library under lib/, with install, check, and standard GNU make conventions. CMake, Meson, Visual Studio project files for Windows, Conan, and vcpkg paths are also documented for alternate build and packaging workflows.
Application teams can link the C library directly or use listed third-party ports; operations teams can invoke the zstd binary for batch compression pipelines. Dictionary workflows cover train, compress with -D, and decompress with the same dictionary file.
Key features
- High-speed lossless compression and decompression
- Configurable compression level and --fast modes
- Stable documented .zst format (RFC 8878)
- Reference C library and zstd CLI utility
- Dictionary training for small data compression
- Makefile, CMake, and Meson build options
- Benchmarked against zlib, lz4, and others
Use cases
- Compressing logs or archives with the zstd CLI
- Embedding libzstd in applications needing fast compression
- Tuning dictionaries for repetitive small-record payloads
- Choosing speed/ratio trade-offs per workload