How Compression Works by Hand: Run-Length Encoding, Symbol Frequencies, Entropy, Huffman Codes, Base-64 Overhead & Lossy Quantisation
Shrink data in a spreadsheet and see why it works: run-length codes, letter frequencies, entropy as the limit, Huffman code lengths, encoding overhead and what lossy rounding costs in quality, with every cell checked as you go.
One-time payment · lifetime access · lessons, labs, exam and certificate included · no subscription.
About this course
This course shows how compression works by doing it cell by cell. You measure text in bits and work out a fixed-length code, run-length encode a scan line with a MID step table and see when RLE makes data bigger. You count symbol frequencies with COUNTIF, turn them into surprise and entropy with LOG(p,2), and follow a Huffman merge table with SMALL to get code lengths, average bits and the Kraft sum. Then you calculate compression ratios, savings and base-64 size, quantise brightness values with MROUND and rate the quality with a signal-to-noise ratio, and finish with storage and transfer savings for a whole month of archive data.
Lessons
- Bits & Bytes of Text: Characters, Raw Size & a Fixed-Length Code Pro
- Run-Length Encoding: Runs in a Scan Line, Encoded Size & When RLE Backfires Pro
- Symbol Frequencies: Counting Symbols, Probabilities & Surprise Pro
- Entropy: −Σ p · log₂ p and the Minimum Bits per Symbol Pro
- Huffman Codes: Merging the Two Smallest Weights, Code Lengths & Average Bits Pro
- Ratios, Savings & Overhead: Compression Ratio, Base-64 Size and Headers Pro
- Lossy Compression: Quantising to Steps, Error & Signal-to-Noise Ratio Pro
- Capstone: Storage and Transfer Savings from Compression Ratios Pro