Specifically with PNG it has a concept of "private" chunks which you can use to store arbitrary data. Conforming decoders will ignore these chunks, and may or may not drop them if the file is modified. See https://en.wikipedia.org/wiki/Portable_Network_Graphics#%22C...
Re:PNG and Hidden Pixels
by 082349872349872 on Tuesday September 01, 2020 @04:11AM
(#24339566)
A simple technique would be to use different block sizes.
Could something similar be done with DEFLATE? Allocate some unused Huffman table? Put stuff in reserved bits?