Hacker News new | past | comments | ask | show | jobs | submit login

> "a technical walkthrough"

> "Suppose you have some strange coin - you've tossed it 10 times, and every time it lands on heads. How would you describe this information to someone? You wouldn't say HHHHHHHHH. You would just say "10 tosses, all heads" - bam! You've just compressed some data! Easy. I saved you hours of mindfuck lectures."

Ahh, my favorite kind of technical walkthrough. Love it




Doesn't that description basically presuppose that you already understand compression? "HHHHHHHHHH" is 10 characters, but "10 tosses, all heads" is 21. Already understanding compression, I of course know that the second part could be efficient if encoded properly, but someone actually needing the explanation probably wouldn't know that.

It's not really wrong, and not really an "oversimplification" as the parent article calls it. It's just a bad example, and it seems confused about the audience it's trying to reach. Either they already understand compression, and it's superfluous, or they don't and it's just confusing.


That was an example, intended for humans. It is much quicker to say "10 tosses, all heads", than it is to say "HHHHHHHHHH".

A computer example might explain that it takes less storage to store "10H" (i.e. the integer 10 followed by the character H), than it is to store 10 H characters in a sequence.


> You wouldn't say HHHHHHHHH.

You wouldn’t and shouldn’t. There are only nine “H” in there!


Ah, but perhaps in this encoding scheme the first H is implicit, and a leading T is encoded as _T. Half the time this results in an infinity increase in bytes saved!


One could read that as having an implicit ellipsis, ie. "HHHHHHHHH..." After all, you would and should say HHHHHHHHH on the way to saying HHHHHHHHHH.


Ah ASCII art. Long rows of identical characters. The only thing that actually allowed a dial up modems compression claims to actually live up to the marketing hype....


> The only thing that actually allowed a dial up modems compression claims to actually live up to the marketing hype....

Don't for get the HTML and other plain text that is sent/received.


I think you could find this interesting: https://www.youtube.com/watch?v=aF1Yw_wu2cM




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: