From: Russ_wattersMonique wrote:
So how does compression work now? zip, rar, mp3 files? You can take out redundant information, the wavelengths you do not hear or freeze the background of the film when it does not move.
But if you can break up the code in blocks, and only store those blocks, you can dramatically reduce the size if you know the code.
Media and text require completely different types of compression.
[simplifications here]
Compression schemes like zip and rar find patterns and replace the contents with markers. You could take out the word "compression" out of this post and replace it with "$1", then put in a table at the end that $1="compression". Decompressing the files re-assembles the words.
Media can be encoded the same way, but its much more difficult (try zipping a photo and see how much smaller it gets - 2% if you're lucky). Most media compression schemes actually reduce the quality of the media, but in ways that you won't notice. If you zoom in on a .jpg picture, you'll see little blocks of color - say, a blue sky has 4 pixels in a square that are almost, but not quite, the same shade of blue. .jpg compression replaces all 4 with the same shade of blue. Most photos can be compressed by upwards of 90% in this way without noticing the loss. DVD uses .jpg compression.
Newer forms of media compression compare frames: if that block of 4 shades of blue is still there in the next frame, you can replace both blocks at the same time. Divx does this. As you can imagine, this is
extremely processor intensive.