[ELI5] What is a Compression Scheme?

288 views

In data compression, what is the compression scheme?

In: 0

3 Answers

Anonymous 0 Comments

This might be the first time I am ever first to an ELI5, so I might be completely wrong and missing the question.

What I learned 30 years ago in college about jpeg compression is this…

If you have a picture, each pixel has a coordinate, like battle ships game, and a color. So starting top left at (0,0) it might be blue. The next pixel (1,0) might be blue too. The next (2,0) might be cyan. Etc thru an entire picture.

If we save the data as:

(0,0) blue

(0,1) blue

(0,2) cyan

(0,3) cyan

(0,4) blue and on and on, there would be lots of information to store.

But if we look at the array (which is the list of values), we might be able to group.

We could say

(0,0-1) blue

(0,2-4) cyan

Each time we can slice the data with a run of the same values, we can compress the information and save a small amount of data.

If you imagine a full picture, if you can find two pixels side by side with the same color, we can potentially drop a bit, and save on file size.

You are viewing 1 out of 3 answers, click here to view all answers.