A really simple wrapper around open-vcdiff
This wraps the simplest API of Open-VCDiff for node v0.12
var vcdiff = require('simple-vcdiff');
Compute the difference between the dictionnary and the target, sending the result buffer to the callback:
vcdiff.Encode(dictionary, target, callback);
Apply a previously computed delta to the dictionnary, sending the result buffer to the callback:
vcdiff.Decode(dictionary, delta, callback);
function (bufferOut) {}
var vcdiff = require('simple-vcdiff');
var dictionary = new Buffer('testing data.');
var target = new Buffer('testing dota is not the same.');
vcdiff.Encode(dictionary, target, function(bufferDelta) {
vcdiff.Decode(dictionary, bufferDelta, function(bufferOut) {
// bufferOut should be identical to target.
});
});
npm install simple-vcdiff