A compression tutorial

Have you ever wondered how big things get sent across the internet so quickly?  I think that we all know that the answer is “compression”.  But, how does this compression work?  Does anyone remember the compression wars between ARC and ZIP?

Learning how is the goal in this tutorial from Code.org.

Make sure that you watch the video first to get the most from the experience.  You’ll see the rationalization for why compression is used along with some real life examples.

The two big terms to learn and understand are “lossy” and “lossless”.  Do you know the difference?

Then, it’s off to the tutorial.  It’s an interesting and interactive concept.  You’re presented with some original text.

Now, the idea is to compress this information, starting at 240 bytes, by looking for patterns that could be repeated.  The patterns are replaced by symbols and you create a dictionary of the symbols.  That’s important because compression without a way to later decompress it is, well, pretty useless.

So, go looking for the patterns and the widget does the character substitution for you.

With these three substitutions, I was able to compress things by 33.75%.  If this text was to be sent, my 240 bytes is now 159.

The more compression, the better the speed.  Even after doing these screen grabs, I can see more ways to compress.

Sounds like a Computer Science classroom competition to me!

OTR Links 10/13/2016

Posted from Diigo. The rest of my favorite links are here.