I took the central idea of encoding deltas (or actually delta less 1, since the delta is always at least one; I'll just say delta below), but did it on the full five letter word. The largest delta was still less than 2*18 but bigger than 2*17. (I'm not sure why the blog mentions 20 bits as the biggest delta; I used the dataset from https://github.com/alex1770/wordle/commit/62520406365ca58a1a...)
I decided I wanted a variable length code in bits. Manually, I found the best break-points that I could:
breaks = [16, 128, 512, 2**12, 2**18]
bitprefixes = ['0', '10', '110', '1110', '1111']
So deltas 0..15 are encoded as '0' plus a 4-bit number, deltas 16..271(=16+256-1) as '10' plus a 7-bit number, etc.Compressed like that, my dictionary runs to 14840 bytes.
1111000000000001010110 // aahed 4839 = 4839- 0
1110100001101100 // aalii 2813 = 7652- 4839
1110110100010010 // aargh 4003 = 11655- 7652
110011000010 // aarti 339 = 11994- 11655
1111000000001101110001 // abaca 5634 = 17628- 11994
00111 // abaci 8 = 17636- 17628
00001 // aback 2 = 17638- 17636
00111 // abacs 8 = 17646- 17638
100111110 // abaft 79 = 17725- 17646
...
However, a non byte aligned code isn't ideal, especially on the gameboy's CPU which doesn't have variable bit shifts as far as I recall. Still, over 3000 bytes beckoning to be re-used for some other purpose. Did they put in a soundtrack yet?Compressor & decompressor: https://gist.github.com/jepler/d502965b57fd52df0838a6def2d32...