There have been some experiments in btrfs to enable inband dedup on arbitrary writes, but nothing that made it in there as yet.
Note however that the discussion misses on the fact that Flatpak itself does perform dedup by using ostree for on-disk storage. ostree implements data structures and ideas very similar to git sans the version control.