Deduplication and different compression types

If I have two different policies with different compression types, and have the same file in both, will it still be deduplicated? Which compression will get applied to it?

Is there a better place to ask this sort of question?

Since this is content-addressable storage, my guess would be that this file would only be compressed once, since it is looked up by the hash of its contents - regardless of its compression.

the easiest would be to test. create local kopia repo and backup one folder. Check repo size. Backup again another folder but with the same content as initial one and different compression policy. Check repo size.

Well, unless the data in question would heavily benefit from particular compression algorithm over the other, this is more of an academic excercise anyway - at least from my point of view.

If I’d design kopia’s algorithms, I would rather keep as much of the work on the repo away, since files are usually put into packs and re-compressing only one of thesr files would result in quite some extra work for no or at least little benefit.

Just my 2c, of course.

agree it is academic sort of.

But if somebody wants to know answer either check code or test or both:) Anything else are just assumptions that might be right or wrong.