What I call "universal recompression" is the precomp-like type, where
we get the extracted original data on output, which we can subsequently
compress with anything we like, thus universal.
But atm recompression of this kind was only implemented for deflate,
and is generally considered impossible for lossy formats (jpeg,mp3) -
for example, we can expand a jpeg to .bmp and losslessly reencode it back,
but then lossless compression of .bmp would produce much larger results
than original jpeg.
And if we'd try to implement an ex-jpeg .bmp compressor... well, we'd
end up with a normal jpeg recompressor, not a universal one.
But now I've got an alternative idea - we can actually use the "empty"
(quantized away) space in that .bmp for storage of something useful,
ie basically steganography.
Now, with such an approach it would be impossible to recompress a
single jpeg, but when there're many, we would be able to "overlap" them,
But its easier to explain if there's simply some other data besides jpegs,
then it would work like this:
- the recompressor takes a .jpg and produces a .bmp and a quantization map
(value intervals for the pixels)
- a steganography coder fills up the "gaps" in the .bmp by that map with
some other (already compressed) data
- now we can compress the .bmp with a lossless coder, and there won't
be any redundancy due to image model not understanding jpeg quantization -
instead we'd get "noise", but natural images already have noise anyway,
and image coders should be able to handle noise much better than unknown
And for decoding:
- the recompressor takes a .bmp and produces a .jpg and a quantization map
- steganography coder decodes the payload from the .bmp using the map