Capstone: DEFLATE-Lite

  • End-to-end compression pipeline
  • LZ77 + Huffman + canonical codes
  • Bitstream framing and headers
1 / 6

Pipeline

  • Tokenize with LZ77
  • Count frequencies
  • Build canonical Huffman codes
  • Emit bitstream
2 / 6

Alphabets

  • Literals 0-255
  • Length symbols 256-271
  • Distance symbols 0-127
  • End-of-block symbol
3 / 6

Fixed vs dynamic

  • Fixed: predefined lengths (lit/len=9, dist=7)
  • Dynamic: lengths stored in header
  • Mode byte selects which to use
4 / 6

Decoder risks

  • Bit order must match
  • Canonical codes must match
  • Must stop on end symbol
5 / 6

Goal

  • Build a DEFLATE-like compressor
  • Validate with round-trip tests
6 / 6
Use arrow keys or click edges to navigate. Press H to toggle help, F for fullscreen.