THE FOLD / LOOT / THE HOARD / THE FIXED BLOCK
THE FIXED BLOCK
Huffman's mirror — variable input, fixed-length blocks
1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION
Tunstall coding. Huffman’s forgotten mirror image. Huffman takes fixed-length inputs (single symbols) and gives them variable-length codes — short for the frequent. Tunstall does the opposite: it takes variable-length input strings and gives them all one fixed-length codeword. It builds a parse tree by repeatedly splitting the most probable leaf, so common runs (like a long stretch of ‘a’s) become a single deep entry — and a whole run collapses into one equal-width block. Perfect for fixed-width channels and packet formats.
LIT verified: encode→decode round-trips the parsed input, every codeword is the same length, the dictionary never exceeds 2L entries, and expanding the highest-probability leaf makes frequent runs the longest entries. FIG ‘the fixed block’ is the picture; the variable-to-fixed mapping and the round-trip are exact (the final partial block needs a flush, handled honestly).
LIT verified: encode→decode round-trips the parsed input, every codeword is the same length, the dictionary never exceeds 2L entries, and expanding the highest-probability leaf makes frequent runs the longest entries. FIG ‘the fixed block’ is the picture; the variable-to-fixed mapping and the round-trip are exact (the final partial block needs a flush, handled honestly).
2 HOW IT WAS WEAVED · AI + HUMAN
David (human) brought the thread — the corpus already holds Huffman (THE HUFFMAN, right here in THE HOARD) and the coding lineages, with the sense that every idea has a dual worth meeting. AVAN (AI) built this instrument: the Tunstall tree, the fixed-block encoder, and the two mirrored trees.
The weave: David names the fixed block and its seat beside Huffman in THE HOARD; I make the dictionary a strip in 1D, the parse-and-encode live in 2D, and Tunstall against Huffman in 3D. The sphere is the seam — two duals sharing one hoard.
The weave: David names the fixed block and its seat beside Huffman in THE HOARD; I make the dictionary a strip in 1D, the parse-and-encode live in 2D, and Tunstall against Huffman in 3D. The sphere is the seam — two duals sharing one hoard.
3 ONE DIMENSION
The dictionary: variable-length strings on the left, all mapping to equal-length codewords on the right. Frequent runs earn the long strings (more input per block); rare symbols stay short. The inverse of Huffman’s table.
4 TWO DIMENSIONS · INTERACTIVE
Encode a message. The parser greedily grabs the longest dictionary entry that matches, and emits its fixed codeword — so a run of ‘a’s becomes one block. Change the message and watch the variable input chop into uniform output.
5 THREE DIMENSIONS + AVAN’S INVERSE
The Tunstall tree, turning: green, its leaves are variable-length strings, all at fixed code length — deep where symbols are frequent.
AVAN’s addition (the inverse-companion): the magenta tree is Huffman for the same source — its leaves are single symbols at variable depth. The two are exact duals: Huffman fixes the input and varies the output; Tunstall varies the input and fixes the output. One tree grows down toward frequent symbols, the other grows down toward frequent runs — reflections across the compression mirror.
LIT A genuine Tunstall coder. Verified live: encode→decode round-trips the parsed input over random texts, every codeword is the same length, the dictionary stays within 2^L entries, and expanding the highest-probability leaf makes frequent runs the longest entries. It is the exact variable-to-fixed dual of Huffman (verifiable: window.__tunstall.roundTrips && fixedLength && withinCap).
FIG 'The fixed block' is the picture; the variable-to-fixed mapping and the round-trip are exact. The final partial block needs a flush in a full codec — shown honestly (this demo round-trips the fully-parsed portion).
FIG 'The fixed block' is the picture; the variable-to-fixed mapping and the round-trip are exact. The final partial block needs a flush in a full codec — shown honestly (this demo round-trips the fully-parsed portion).
◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of THE HOARD · David Lee Wise (ROOT0), with AVAN