Game Boy Wordle clone: How to compress 12972 five-letter words to 17871 bytes
alexanderpruss.blogspot.com
Game Boy Wordle clone: How to compress 12972 five-letter words to 17871 bytes
1–10 of 170 posts
Re: Game Boy Wordle clone: How to compress 12972 five-letter words to 17871 bytes
#2> I don’t have a good feel for how fast the Game Boy runs, so I did a bit of speed optimization.
This sounds like a very wrong approach to optimization. I mean, if you don't know exactly what and how to optimize, or if there's a need for optimization at all, then what are you doing?
Re: Game Boy Wordle clone: How to compress 12972 five-letter words to 17871 bytes
#3And far better than gzip compression. Nice work. My takeaway is that context matters - this is not General Purpose Compression, but compression made specifically for this case. Good Stuff.
Re: Game Boy Wordle clone: How to compress 12972 five-letter words to 17871 bytes
#4Why use one byte for each character? Why not 3 bytes per word?
Re: Game Boy Wordle clone: How to compress 12972 five-letter words to 17871 bytes
#5Did you compare this to compression with a trie?
Re: Game Boy Wordle clone: How to compress 12972 five-letter words to 17871 bytes
#6Why use one byte for each character? Why not 3 bytes per word?
[deleted]
Re: Game Boy Wordle clone: How to compress 12972 five-letter words to 17871 bytes
#7Are there general purpose compression tools that preserve the data, but not the ordering?
[One of] the reasons gzip does worse is it also preserves the order of input.
Re: Game Boy Wordle clone: How to compress 12972 five-letter words to 17871 bytes
#8Did you compare this to compression with a trie?
See step 1; the first level is stored as a trie. Then, see Notes, where it's stated that trie-ifying level 2 requires more space.
Re: Game Boy Wordle clone: How to compress 12972 five-letter words to 17871 bytes
#9Looks like you can try it out on this webassembly Gameboy emulator https://wasmboy.app/
Re: Game Boy Wordle clone: How to compress 12972 five-letter words to 17871 bytes
#10Why use one byte for each character? Why not 3 bytes per word?
Please see step 2.
> Step 2: Each four letter “word” (or tail of a word) can be stored with 5 bits per letter, thereby yielding a 20 bit unsigned integer.