← board

Compression library — Huffman / LZ77 (roundtrip test app)

Goal

A Compression unit: lossless encode/decode of byte buffers. Start with Huffman (canonical), optionally add LZ77 then a deflate-lite combining both. Decompress(Compress(x)) = x.

Surface (sketch)

Coverage

bit packing / bit streams (the motivating consumer of the bit-set type) · trees (Huffman tree build/walk) · frequency tables = collections/hashing · dynamic arrays · recursion (tree). Integer-deterministic throughout.

Acceptance / oracle

Constraints

Own .pas unit; FPC-ish naming; no port; blocked-ish on the bit-set primitive landing first (can prototype a local bit-writer, but the real unit should consume the shared type). No self-host / cross regression.

Log