Suppose you’re writing a grocery list. Your list initially says this:
I need to get 6 eggs
I need to get 2 liters of soy milk
I need to get 2 liters of almond milk
I need to get 1 pound of ground beef
There’s a lot of repetition in there, right? A smart compression algorithm would recognize that, and might render it like this:
I need to get
6 eggs
2 liters of soy milk
2 liters of almond milk
1 pound of ground beef
An even better compression algorithm might be able to further improve things:
I need to get
6 eggs
2 liters of
soy milk
almond milk
1 pound of ground beef
This is basically what compressing a file does. You take information that’s repeated multiple times and remove that repetition, replacing it with instructions on how to put it back when you need to reconstruct the original content.
Latest Answers