4 ms·
Exactly. Each compressed input can only decompress to one output. But the number of input values possible is far smaller than the possible output space. Theref
by twhitmore 6y ago
Exactly. Each compressed input can only decompress to one output.
But the number of input values possible is far smaller than the possible output space. Therefore many outputs cannot be reproduced.
Real compression algorithms compressing structured data preserve the above properties. All outputs are representable, but they devote shorter codes (and thus most of the coding symbol space) to the most common patterns. Since coding symbol space is finite, random or less compressible data are left with longer symbols/ bitstrings than if conveyed uncompressed. For a reasonably structured file, the overall outcome is compression. However random files experience a small increase in size due to coding overhead.