Shannon Source Coding: Entropy, Huffman Code Length, Kraft Sum and Block Extension
Build a symbol source and watch the best prefix code for it. Choose the alphabet size and how skewed the probabilities are (Zipf-like), and the Huffman algorithm assigns short codewords to common symbols and long ones to rare symbols. A stream of sampled symbols is encoded live; its measured bits per symbol converges to the exact Huffman average length, which always sits between the entropy H and H + 1. Block extension shows how coding pairs and triples closes the gap. A Blender-built encoder and numerical checks are included.
Build a symbol source and watch the best prefix code for it. Choose the alphabet size and how skewed the probabilities are (Zipf-like), and the Huffman algorithm assigns short codewords to common symbols and long ones to rare symbols. A stream of sampled symbols is encoded live; its measured bits per symbol converges to the exact Huffman average length, which always sits between the entropy H and H + 1. Block extension shows how coding pairs and triples closes the gap. A Blender-built encoder and numerical checks are included.
Build a symbol source and watch the best prefix code for it. Choose the alphabet size and how skewed the probabilities are (Zipf-like), and the Huffman algorithm assigns short codewords to common symbols and long ones to rare symbols. A stream of sampled symbols is encoded live; its measured bits per symbol converges to the exact Huffman average length, which always sits between the entropy H and H + 1. Block extension shows how coding pairs and triples closes the gap. A Blender-built encoder and numerical checks are included.
3D · Three.js / WebGL renderer · 60 FPS target · runs fully client-side, no install