3 ms·
The article mentions compression briefly. They are using basic run-length encoding. There are probably better algorithms. GP suggested Huffman but I don't thin
by GuB-42 6y ago
The article mentions compression briefly. They are using basic run-length encoding.
There are probably better algorithms. GP suggested Huffman but I don't think it will work. Something like the algorithm used by crinkler [1] (context modeling + arithmetic coding) may work better. It can be made even better if combined with the encoding (the base doesn't have to be a power of two).
Anyways, no need to overdo it, the author's technique works. At least for the newer base2048 version, optimized for long tweets
[1] https://xoofx.com/blog/2010/12/28/crinkler-secrets-4k-intro-executable/ https://xoofx.com/blog/2010/12/28/crinkler-secrets-4k-intro-...