Skip to content

compression101.com Posts

The story of the student, who created the most famous compression algorithm, because he tried to avoid an exam

This is the third in a series of articles where I go over the basics of common type of compressions. You can find the first article here When you take pictures, he’s there.When you listen to music, he’s there.When you surf the web, he’s there.This article is dedicated to him. *** Drawing lesson Question: How would a basic drawing software which allows you to draw in just eight colors, encode the information into bits? A common way to do this is to predefine a specific bit sequence, of a fixed length, per color. For eight colors we…

Site page load optimization by compression – Case study

I recently saw a video on “The royal game of ur”, this is a 4500 years old board game that was rediscovered in the 20th century. The rules of the game were not clear at first, but later on, in the 80s, a tablet containing the instructions was translated. I thought it would be nice to recreate this game online. So I did. When a user enters a website his browser loads multiple files. In my site it includes the HTML file, a few audio files and a few images.  There are three main reasons why the…

Where did the missing 44GB went? – Data compression 101

This is the second in a series of articles where I go over the basics of common type of compressions. You can find the first article here Wikipedia in its English version has 3.5 billion words. All human knowledge compressed to 3.5 billion words. How do I know this?  I read it on Wikipedia. *** Some of you may be surprised to discover that the recent text version of Wikipedia can be downloaded in its entirety. As I’m writing this lines, the English version of Wiki is 58GB, but if someone will try to download it he…

Information entropy explained

How much information is in the result of a coin toss? That’s an odd question to ask. It doesn’t sound right. You cannot think of information as if it were water in a bucket, right? Well Claude Shannon begs to differ. In 1948, Shannon published his paper “A Mathematical Theory of Communication,” and by doing so laid the foundation of information theory. This theory became a really big deal, contributing to many fields of science, especially to the field of data compression. Information theory states that we can quantify the information that is contained in a random…

Replacing a sentence with a single character – Data compression 101

This is the first in a series of articles where I will go over the basics of common type of compressions. There is a legend about a famous 19th-century writer, Victor Hugo, who was on vacation. That writer wanted to know how the sale of his new book, “Les Misérables”, was progressing. So, what did he do? He wrote to the publisher. When the publisher opened the letter, he was surprised to find out that it contain a single character: “?” *** In data compression we are trying to represent relevant data in a minimal number of…