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
3
u/ebix Jun 18 '12
You did, but not why. That's where the proof comes in. Again disagreeing with your TL;DR, it is often the case that files cannot be compressed, namely compressed files. The theory is ABSOLUTELY relevant, accurate, and applicable, just not in the way you expected it to be.
As I have said elsewhere, there are definitely more specific and interesting things you can prove about compression in general. But none (that I am aware of) quite as elegantly.