the420code · a₀ · the virtual collider · the compressor arithmetic coder · WebGL2

Instrument · compression as prediction

The Compressor

Every byte a cell, coloured by its cost in bits — surprise made visible.

This is not a decorative gradient. The heat you see is the real cost of every byte, computed live by the exact 32-bit Witten–Neal–Cleary arithmetic coder and adaptive context model from the420code's compression proof, ported verbatim and run in your browser. Each cell is one byte of a real message; its colour is that byte's self-information, −log₂(p) — precisely the number of bits the coder must pay to emit it. Cold, with no shared knowledge, almost every byte is a surprise and burns near the 8-bit ceiling. As sender and receiver prime on the same corpus, the grid cools: you transmit the surprise, not the whole. Then the residual is decompressed back, bit-for-bit lossless — verified on screen. The shared-knowledge gain is measured live, not asserted.

Phase 1 / 4

Priming

Sender and receiver stream the shared corpus. The model learns — and this is never transmitted.

Your browser lacks the WebGL2 path this heat-map needs.
The compression proof itself still runs — see the numbers and code linked below.
1.0×
the data
booting…

The heat is the real coder's cost per byte, live. Space = play/pause · try “Random bytes” to watch it refuse to compress — high entropy stays hot, honestly.

What is honest here — and what is not

Honest: the coder driving this is the actual arithmetic coder from the proof, not a mock. The per-cell heat is the true −log₂(p) the model assigns; the compressed length shown is the real bit count; and the round-trip is genuinely lossless — the decoder rebuilds the grid and we compare it byte-for-byte (the ✓ lossless badge only lights if it matches). The shared-knowledge gain on screen is measured, not typed in.

Not a claim: this does not beat information theory. Feed it the Random bytes grid and it stays hot and barely compresses — because incompressible data is incompressible, and an honest coder admits it. The layout is illustrative (the message is tiled to fill the screen, and the cold→primed cooling is animated for legibility). It is the mechanism, made visible — consistency, not proof.

The one idea, in one line

cost(byte) = −log₂ p(byte | context)  — Shannon self-information, the bits the coder pays compression = prediction  — a better predictor is a better compressor sent = Σ cost(byteᵢ) over the message  — only the residual crosses the wire The context model estimates p(byte | previous N bytes) from counts it has actually seen. Priming on a shared corpus raises those probabilities for text that looks like the corpus, which lowers the cost — the grid cools. The shared corpus is never sent: the decoder primes on the same bytes at its end. This is the load-bearing claim of the 420 code, shown as heat.
← back to the 420 code