guest - flak
Flaakle

tweet compression

Sometimes you’ve got something really important to tweet, but it doesn’t quite fit in 140 characters. There’s several techniques that can help in this situation.

One option is to use another platform that allows longer posts, but like I said, this is really important. Twitter or bust. Or write the post on a napkin, then upload a picture of it, but let’s pretend we have an irrational preference for textual information conveyed as text.

English text has a lot of redundancy. Certain digraphs are particularly common. In fact, many digraphs are actually descended from single letters. We can shave some characters from our tweets by winding back the clock.

If instead of writing “This or that” we write ”Þis or þat” using thorns, thankfully preserved in unicode by our viking friends, that represents a savings of 16%. It’s the same number of bytes, but I don’t make the absurd rules.

Besides the old standbys like æ, we can steal a trick or two from German and turn ue into ü. Unicode also includes some deprecated ligatures like fi. Mostly we want the compressed text to be recognizable even to those without a decoding tool. “Please fix the shoot.” -> “Plêse fix þe ʃōt.” Maybe.

Enter text here:

Encoded: (0)
Decoded:
Posted 2016-08-27 19:00:59 by tedu Updated: 2016-09-14 14:37:00
Tagged: javascript language web