Xdelta is a candidate for use in new repository formats. It is a compression format that works well with binary files. It is fast, well-known, efficient and open-source.
Can xdelta be used to generate a target text from a snapshot and a series of deltas without generating every intermediate text? Or is it so efficient that we don't care whether it does?
Other formats e.g. DraftSpecs/MultiparentDiffs can generate a text directly from a series of deltas, using only those lines present in the target text.
At a first glace, the api is not written in a way that is easy to compose patches. Part of this is because it also applies a compression to the delta (Huffman encoding). The specific format is "VCDIFF" (rfc3284). So so the RFC may have better hints about composability.
If we move to a blob format for repositories, it would be nice if bundles were a variant of that format.
xdelta doesn't support multiple parents, but this would arguably be useful for bundle formats, because brief bundles are valued. One cause of large bundles is merges. When a revision has multiple parents, changes introduced by one of the parents are shown as changes versus the other parent. But DraftSpecs/MultiparentDiffs can generate a diff that uses both parents, which can be much smaller.