r/askscience • u/[deleted] • Jun 17 '12
Computing How does file compression work?
(like with WinRAR)
I don't really understand how a 4GB file can be compressed down into less than a gigabyte. If it could be compressed that small, why do we bother with large file sizes in the first place? Why isn't compression pushed more often?
414
Upvotes
2
u/purenitrogen Jun 18 '12
I like the simplicity of this explanation, so can I ask, what if the "sentence" contains "1".
"I am 1 year old"
If we say 1 = year, "I am 1 1 old"
Now our algorithm reads back "I am year year old"
How is this avoided?