3 ms·
> compressing 1GB to zero bytes Is this even possible? Don’t we need atleast some data to decompress from?
by Alifatisk 3y ago
> compressing 1GB to zero bytes
Is this even possible? Don’t we need atleast some data to decompress from?
- AnimalMuppet 3y agoDepends on your definitions. I could decompress 1GB from zero bytes, with a program that is just over 1GB in length...
- albertzeyer 3y agoIt's very well defined on the homepage: > Create a Linux or Windows compressor comp.exe of size S1 that compresses enwik9 to archive.exe of size S2 such that S:=S1+S2 < L So obviously your suggestion does not work.
- AnimalMuppet 3y agoWell, all right, I could use conventional compression such that S2 is zero, by making S1 what would have been S1 + S2. That still leaves the "compressed image" having zero bytes, by hiding the actual compressed image in the executable. Note well: I am not claiming that there is any reasonable reason to do this. It's just a way to say "well acksually..."
- Dylan16807 3y agoNotice how you had to change the wording in this comment to make the scenario work. If the problem statement is "compressing 1GB to zero bytes" or "decompress 1GB from zero bytes" then that trick is easily called out as invalid.
- Alifatisk 3y agoSo your way around is by baking the data into the executable instead? How good of a ”solution” is that in reality? Like what if you were tasked to decompress multiple different files? Would you bake does into the executable aswell? Personally, I would count this way around as invalid.
- jfengel 3y agoNot really 0, since any exe file will have some minimum length, and that's defined to be part of the calculation. Conceptually you could cram it into some dozens of bytes (trivial initial state of the universe + basic physics + iteration). In practice, of course, that's ridiculous.