What are compressed and uncompressed files, how does it all work and why compressed files take less storage?

927 views

What are compressed and uncompressed files, how does it all work and why compressed files take less storage?

In: Technology

27 Answers

Anonymous 0 Comments

Compressing and uncompressing a file is like translating a book into a different language, except you make up the language based on what’s in the book. To make files smaller, you have your new language use very short words for the most common words or phrases in the original language, and longer words for the uncommon ones. Then you have to make the dictionary that translates back to the original language, or figure out rules so that you can construct the dictionary, and then the compressed file is the translated file plus the dictionary.

In most cases the compression method (or translation) is chosen to be very good for “normal” files, but bad for “uncommon” files that you generally wouldn’t encounter. Mathematically you can’t have a one-to-one translation that converts every possible combination of letters into a shorter form, because then some combinations would have the same translation and you wouldn’t know which one was the original when you translate it back. If you don’t need *exactly* the original file because it’s something like a picture, you can have a translation that is always shorter, but in general if you try to compress an already compressed file it doesn’t get smaller.

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