Cross-compression: Compressing one file based on others

If taking many photos of the same scene, for example, it would be a good idea to compress these photos in terms of each other, using something like differential encoding (though probably more sophisticated; maybe building an LZW dictionary on one file then applying it to all files?). Domain-specific methods could be used as well. The files would necessarily be paired (don’t even think about changing one without altering the other as well), but it would offer significant savings over solely file-by-file compression.

Something like ZIP or TAR+GZIP may already do this. I’ll have to check the specifics of the algorithms employed. Regardless, I think I see a new coding opportunity coming my way.

Edit: Zip does not compress files together, but this approach is more or less exactly what tar+gzip does (including the idea of using a common LZW dictionary).

Leave a Reply

Your email address will not be published. Required fields are marked *