Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> compressing 1GB to zero bytes

Is this even possible? Don’t we need atleast some data to decompress from?



Not 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.


Depends on your definitions. I could decompress 1GB from zero bytes, with a program that is just over 1GB in length...


It'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.


Well, 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..."


So 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.


Notice 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.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: