I was indeed thinking of lossless compression: In practice it compresses almost all its input. If the the output length does not have to be constant, it's fine that some input actually gets inflated. As long as it compresses the average input.
But in this case the output length might have to be constant? If that's the case, you are of course correct.
But in this case the output length might have to be constant? If that's the case, you are of course correct.