Is it possible to compress only specific file types?

What would maybe make sense is to implement early abort when data is not compressible - similar to one existing in ZFS.
But it would be quite serious undertaking and IMO brings very limited gains to backup software like restic. Especially given multiple much more important features waiting for implementation.

But let’s see what others think.