Me, being the math dork that I am, was thinking about ways to increase lossless file compression ratios (formats like .RAR and .ZIP are lossless file compressions). I figured that since you had a lossless file compression of a sort, that once you compressed a file once, you could keep compressing it to impressively small sizes (after all, a .RAR file is still a file, so why not?)
Thus, I derived that for some lossless file compression function R(b) where, b = number of bytes of original file, that:
R(b) = x * b : x is compression ratio less then 1
R(R(b)) = x^2 * b
R(R(R(b))) = x^3 * b
and so on...
thus, lim x^n * b : (n increases to infinity) = 0 (this means that if you compressed file b a very large number of times, its file size would get very close to zero)
I thus set out to test this. I took the minecraft.exe file (232501 bytes) and using WinRAR, compressed it to a file of 93162 bytes, which works out to a forty percent compression ratio. I then proceeded to compress the minecraft.rar file into a file called minecraft2.rar. However, what happened was that minecraft2.rar was BIGGER then minecraft.rar by like 100 bytes, which made no sense to me. And I kept compressing it too, and the size of each file only got bigger.
Does anyone know why this happens? Any computer nerds willing to explain this? I know math but not alot about the specific nuances of computers. Any help would be appreciated. This puzzles me and I can't think of any reason why this would be true.
Thus, I derived that for some lossless file compression function R(b) where, b = number of bytes of original file, that:
R(b) = x * b : x is compression ratio less then 1
R(R(b)) = x^2 * b
R(R(R(b))) = x^3 * b
and so on...
thus, lim x^n * b : (n increases to infinity) = 0 (this means that if you compressed file b a very large number of times, its file size would get very close to zero)
I thus set out to test this. I took the minecraft.exe file (232501 bytes) and using WinRAR, compressed it to a file of 93162 bytes, which works out to a forty percent compression ratio. I then proceeded to compress the minecraft.rar file into a file called minecraft2.rar. However, what happened was that minecraft2.rar was BIGGER then minecraft.rar by like 100 bytes, which made no sense to me. And I kept compressing it too, and the size of each file only got bigger.
Does anyone know why this happens? Any computer nerds willing to explain this? I know math but not alot about the specific nuances of computers. Any help would be appreciated. This puzzles me and I can't think of any reason why this would be true.