3 ms·
> After all, the amount information in the weird code should still ultimately be approximately the same as the original source code, right? Taking a very high
by usrusr 3y ago
> After all, the amount information in the weird code should still ultimately be approximately the same as the original source code, right?
Taking a very high level view of this: the compressor can't know about the rules that are the difference between a .weird file that is valid .js and a byte sequence that is not and neither can it know the difference between bytes that are valid .js and look like .weird and are part of the subset that are encodings of a .js file and those that are not.
The compressor builds a more or less accurate model of observed probabilities, but even the most optimal encoding would still have to keep escape hatches around for all other bit sequences. Those escape hatches are not free.