Re:Elfshaker: Version control system fine-tuned for binaries
by hcs on Friday November 19, 2021 @02:07PM
(#29280984)
It should be possible to do this in IPFS already if you use the go-ipfs --chunker option with a content-sensitive chunking algorithm like rabin or buzhash [1]. With this there's a good chance that a file with small changes from something already on IPFS will have some chunks that hash identically, so they'll be shared.
[1] https://en.wikipedia.org/wiki/Rolling_hash#Content-based_sli...
Re:Elfshaker: Version control system fine-tuned for binaries
by londons_explore on Friday November 19, 2021 @03:13PM
(#29281765)
But that isn't quite as good as something like this that can 'understand' diffs in files, rather than simply relying on the fact a bunch of bytes in a row might be the same.
Re:Elfshaker: Version control system fine-tuned for binaries
by hcs on Friday November 19, 2021 @03:34PM
(#29282062)
I don't think elfshaker actually does do any binary diffing (e.g. xdelta or bsdiff). It works well because it uses pre-link objects which are built to change as little as possible between versions. Then when it compresses similar files together in a pack, Zstandard can recognize the trivial repeats.
Re:Elfshaker: Version control system fine-tuned for binaries
by peterwaller-arm on Friday November 19, 2021 @03:57PM
(#29282369)
Author here. This is correct, we set out to do binary diffing but we soon discovered that if you put similar enough object files together in a stream, and then compress the stream, zstandard does a fantastic job at compressing and decompressing quickly with a high compression ratio. The existing binary diffing tools can produce small patches, but they are relatively expensive both to compute the delta and to apply the patches.
It seems obvious that whenever something is saved into IPFS, there might be a similar object already stored. If there is, go make a diff, and only store the diff.