Imagine you want to save a message:
AAAAAAAAAA
AAAAAAAAAA
AAAAAAAAAA
AAAAAAAAAA
AAAAAAAAAA
BAAAAAAAAA
AAAAAAAAAA
AAAAAAAAAA
AAAAAAAAAA
AAAAAAAAAA
It takes 100 characters to save it.
You could save it as:
50*A,B,49*A
And have it saved 11 characters. This is lossless compression, and a kind of thing (though obviously a very primitive version) that, say, 7zip or winrar do.
You could imagine a different algorythm that saves even more space:
100*A
And voila, you saved your message in 5 characters. Well, not exactly your message, you lost the B, but it’s very close to the message, maybe reader wouldn’t notice the B anyway. This is “lossy” compression, where you sacrifice some information the original had in order to save even more space. This is (a very primitive version of) what saving an image as JPG or music as MP3 does. Of course, these formats are popular because they are very good at only loosing the information humans actually don’t notice, but idea is the same.
Latest Answers