I have already written a Haskell program to generate Huffman codes, so I could potentially use it here after modification.
Generate a code from a representative sample
Create a code for base64 too
Create the JavaScript functions to encode/decode
Actually use the compression (previously 2237 chars escaped to 4295 chars partway through the Earthquake scenario, now it is saved to less than 1850 chars)
Add comments to the Haskell files so maybe people will know what they are for.
Merge pull request #139 from rcatlin/compress-save

Compress save