This site contains learning notes on compression and coding algorithms. The initial release focuses on ZSTD, LZMA, BSC, LZ4, zlib, and Brotli, aiming to put algorithm concepts, engineering tradeoffs, and C++ API examples in a single maintainable knowledge base.
Recommended Learning Path
- Start with "Compression Basics" and "Coding Models" to build shared knowledge of dictionary matching, entropy coding, context modeling, and block sorting.
- Then compare ZSTD, LZMA, LZ4, zlib, Brotli, and BSC horizontally to form basic intuition about "speed / ratio / memory / compatibility".
- Finally, map abstract concepts to real API calls and output results via minimal programs in
examples/cpp.
Algorithm Map
| Direction | Representative | What You'll Learn |
|---|
| General-purpose modern | ZSTD | How to tune wide range between ratio and throughput |
| High-ratio archiving | LZMA | Benefits and costs of large window, range coding, strong modeling |
| Ultra-fast low-latency | LZ4 | Why many systems trade ratio for throughput |
| Compatibility-first | zlib | Why DEFLATE ecosystem persists |
| Web text compression | Brotli | Static dictionary and text-scenario optimization |
| Transform / block sorting | BSC | "Transform first, then encode" approach |
Learning Entry Points
Compression Basics
Understand entropy, dictionary, sliding window, block sorting, context modeling, and checksums.
Start LearningAlgorithm Notes
Organized notes on core ideas and usage boundaries of ZSTD, LZMA, BSC, LZ4, zlib, Brotli.
View AlgorithmsC++ Examples
Learn compression library APIs through minimal runnable programs.
Run Examples