3 ms·
>I'm trying to do multi-version support for my users so they can upload the same file (same name) and have a version history. >I have no idea how this stuff wo
by zahlman 2y ago
>I'm trying to do multi-version support for my users so they can upload the same file (same name) and have a version history.
>I have no idea how this stuff works
>I'd be happy if there are node/go/python bindings (in that order of preference)
When you write code in those languages, over time you accumulate multiple versions of it in much the same way, yes? I assume you use a tool such as Git, Mercurial (hg), SVN etc. to manage this.
As you say, text files (like your source code) are pretty straightforward. But these tools can generally be adapted to handle binary files as well - see for example https://stackoverflow.com/questions/3601672 https://stackoverflow.com/questions/3601672 and https://stackoverflow.com/questions/9478023 https://stackoverflow.com/questions/9478023.
xdelta and bsdiff are implementations of actual diffing algorithms - they compare two similar versions of a file and create a representation of what changed.