How Compression Works
From First Principles — Simple to Advanced
Every file on your computer is a sequence of bytes. Compression is the art of finding patterns and redundancy in those bytes and representing them more efficiently. The original data doesn't change — we just find a shorter way to describe it.
This series walks through the most important compression algorithms ever invented,
starting from the simplest ideas and building up to the techniques behind modern tools like
gzip, bzip2, and zstd. Each page builds on concepts
from previous ones.
- 001
- 002
- 003
- 004
- 005
- 006
- 007
- 008
Deeper Dive Into...
The algorithms above cover lossless compression — shrinking data without losing a single bit. But the rabbit hole goes much deeper.
- 009
- 013
- 010
- 011
- 014
- 012
- 015
Modern Lossless Formats
How modern compressors combine the building blocks above into practical, high-performance tools.
- 016
- 017