Skip to content

compression101.com Posts

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 will 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…

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

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 symbols. Take a file and shave of him every possible bit. Less is more, that is,  a website that takes less…