Open FedC opened 10 years ago
While this is the best binary diff function to this day in pure JavaScript, it's not a reference implementation with file support: it's an implementation of the algorithm, but in memory. The diff it generates is an array of numbers and strings, not a binary buffer ready to save to file.
For my projects, JSON.stringify(diff)
suffices, but if you want interoperability with RFC 3284 for VCDIFF files on disk, you might want to take a look at the Node.JS wrapper for open-vcdiff. Unfortunately, that one doesn't seem to compile with Node.JS 5 at the moment...
I tried using this library to reconstruct an image "b.jpeg" from "a.jpeg" and "b-a.delta" made with the C++ diffable lib. to no avail.
Also, when encoding the delta from a and b, I get a delta that's 88.6kb while the C++ diffable's delta is merely 30kb.