RPR1 · Re-Pair word codec

Compression lab

A generic rebuild of the text compression in the 1993 Game Boy KJV: tokenize into words, fold frequent adjacent pairs into grammar rules, store the sorted word list front-coded with a suffix code for common endings, then reserve low byte values as one-byte codes for the hottest symbols. The cartridge reserved 0x55 of those and spent 0x82–0x9E on suffixes. Paste text, move the knobs, and watch every byte get counted — lexicon and tables included.


01 Input 0 bytes

Each reserved byte removes 256 addresses from the two-byte space.

A pair must repeat this often to earn a 4-byte rule.

Also capped by whatever id space N leaves.


02 Result

Nothing compressed yet. Paste text and press Compress.

Full decoded text


      

Recursive pair breakdown