Home▸Algorithms & AI▸Arithmetic Coding: Nested Intervals and Bits per Symbol (2D)

Arithmetic Coding: Nested Intervals and Bits per Symbol (2D)

The nested partition of the unit interval, one row per symbol, with message tiles, the compressed bit string and a plot of arithmetic, Huffman and fixed-length bits per symbol against the entropy. Same shared exact encoder as the 3D scene.

Algorithms & AI2DModerate60 FPS📱 Mobile-adapted🟠 Blender⇄ 3D version
Arithmetic Coding: Nested Intervals and Bits per Symbol (2D) ↗ Open standalone

Encode a random message with exact arithmetic coding: every symbol splits the current interval in proportion to its probability and the chosen piece becomes the next row, magnified. Change the alphabet size, skew, message length and seed to compare the final code length with the information content, the entropy and a Huffman code, and see the code value pass through every row. A Blender-built board and tiles, with exact big-integer numerical checks built in.

⚙ Under the hood

The nested partition of the unit interval, one row per symbol, with message tiles, the compressed bit string and a plot of arithmetic, Huffman and fixed-length bits per symbol against the entropy. Same shared exact encoder as the 3D scene.

Arithmetic CodingEntropyHuffman CodingData CompressionInformation Theory

2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)