The Measure of Surprise
Bits, compression, and codes that survive noise
Why does a rare event tell you more than a common one? Why can English be squeezed into a smaller file while random noise refuses to shrink? And how can a few extra, carefully placed bits let a message cross a crackling line intact? This book answers with things you can poke: guessing games, a live Huffman tree, a bit-flipping channel and a code that finds its own mistakes.
Every chapter shows an idea before naming it. Drag the sliders, type into the boxes and break things on purpose. Six colours keep the same meaning on every page:
The Measure of Surprise — an interactive introduction to information theory. Plain HTML, CSS and canvas; works offline, straight from disk. Your progress is stored only in this browser.