http://en.wikipedia.org/wiki/Data%5Fcompression#Lossless%5Fdata%5Fcompression
For any given compression scheme, one can provide sample input that would result in no savings in space, right?
http://en.wikipedia.org/wiki/Data%5Fcompression#Lossless%5Fdata%5Fcompression
For any given compression scheme, one can provide sample input that would result in no savings in space, right?
Correct. Try zipping a zip file ... if the data is already compressed, you won't be able to get further compression.
For any given compression scheme, one can provide sample input that would result in no savings in space, right?
Yes: A single bit.
Yes, there's always something that will grow larger. The pigeonhole principle says that if you have a space of inputs, and a 1-to-1 function (the lossless compression), then the number of outputs has to be the same as the number of inputs.
If the inputs are files of N bits, then the number of inputs is 2**N
, and the number of outputs is 2**N
. You can't store that many different outputs in files all shorter than N bits.
Absolutely.
If it wasn't, you could conceivably run the output of the compression into the compressor again ad infinium for better compression until you get all the way to a single bit. That's obviously impossible.
"if I give you a stream of integers, can you compress them always?"
In the "zipping a zipfile" example, why are you thinking of bytes in the zipfile as something other than a stream of integers?
That was a pretty concise example of an instance when you could "defeat" lossless data compression.