Live data from Hacker News

A Tweet is Worth (at Least) 140 Words With this Compression Algorithm

thevirtuosi.blogspot.com

1–10 of 39 posts

Re: A Tweet is Worth (at Least) 140 Words With this Compression Algorithm

#4

Good article, but isn't the author describing Huffman codes?

Same basic idea. He's using variable-length input strings and mapping them to unique symbols rather than the other way around, but it seems like he's using entropy measurements to build an optimal trie.

Re: A Tweet is Worth (at Least) 140 Words With this Compression Algorithm

#5
To extend upon this idea - if you really wanted to maximise the data you could transmit in a single twitter message you could use the full 31bits of unicode (instead of just the chinese subset) and then apply standard lossless data compression techniques to the generated unicode for further improvement.

Re: A Tweet is Worth (at Least) 140 Words With this Compression Algorithm

#8
post #7

So Twitter allows 140 (UTF-8?) characters, regardless of the number bytes? The article wasn't clear about this.

Here's the Twitter dev article that I used for designing my URL shortener: https://dev.twitter.com/docs/counting-characters#Twitter_Cha...

Basically, they use the Normalization Form C of Unicode normalization which counts code points, not UTF-8 bytes.

Re: A Tweet is Worth (at Least) 140 Words With this Compression Algorithm

#9

Good article, but isn't the author describing Huffman codes?

Same basic idea. He's using variable-length input strings and mapping them to unique symbols rather than the other way around, but it seems like he's using entropy measurements to build an optimal trie.

Is an arbitrary bit sequence valid unicode? If so, I'm curious if a simple per-character Huffman encoding of English would be more efficient.
Post reply on HN