How to use this guide
Each algorithm page starts with an example, explains the idea, and then identifies its implementation in this repository. The course sequence puts the chapters in dependency order. You can read from the beginning without knowing compression vocabulary.
If you are new to compression
- Read what compression does and bytes and bits. These define the input and the goal.
- Run a round trip. The commands and their arguments are explained there.
- View the interactive examples. They are deliberately smaller than the Rust codecs.
- Read probability, prefix codes, and arithmetic coding.
- Walk through Huffman and LZ77 before PPM.
You do not need to memorize a formula. When a page mentions a context, think “the bytes or bits already seen.” When it mentions a model, think “a rule that estimates what comes next.” The glossary is always available.
If you want to change code
The Codebase section is separate from the foundations, so you can skip it until you want to read or change Rust. Begin with the repository layout, then use Rust notation used here if the syntax is unfamiliar. Follow the archive flow and one worked example: LZ77, block Huffman, or byte PPM. The source map and onboarding help with your own change.
If you want to compare algorithms
The codec reference lists every CLI name and its source module. The experiments guide explains fair comparisons, round trips, stats, profile, and the two optional Wikipedia corpora. The sample file is for learning correctness, not for ranking codecs.
What does “order” mean?
An order-1 byte model looks at the previous one byte; order-3 looks at the previous three bytes. An order-8 bit model looks at the previous eight bits. These are different units. The CLI names ppm-oN use bytes, while ppm-bit-oN use bits.