3 ms·
For text, you would probably want an encoding hard coded into the algorithm. Because (in a given language) the distribution of characters is relativly consisten
by gizmo686 13y ago
For text, you would probably want an encoding hard coded into the algorithm. Because (in a given language) the distribution of characters is relativly consistent, you do not loose much by deciding which characters only need 2 bits and which ones need 10; and you save on having to put this information in the compressed data.
But you are right that their are far better algorithms for text compression (although if doing this character re-encoding makes sense, I would imagine most implementations include it along with the main algorithm, and several other bonus compression algorithms).