0.1.12 • Published 8 years ago

simple-vcdiff v0.1.12

Weekly downloads
4
License
Apache-2.0
Repository
github
Last release
8 years ago

node-simple-vcdiff

A really simple wrapper around open-vcdiff

Description

This wraps the simplest API of Open-VCDiff for node v0.12

API

Require

var vcdiff = require('simple-vcdiff');

Encode

Compute the difference between the dictionnary and the target, sending the result buffer to the callback:

vcdiff.Encode(dictionary, target, callback);

Decode

Apply a previously computed delta to the dictionnary, sending the result buffer to the callback:

vcdiff.Decode(dictionary, delta, callback);

Callback

function (bufferOut) {}

Sample

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.
	});
});

Install

npm install simple-vcdiff

0.1.12

8 years ago

0.1.11

8 years ago

0.1.10

8 years ago

0.1.9

9 years ago

0.1.8

9 years ago

0.1.7

9 years ago

0.1.6

9 years ago

0.1.5

9 years ago

0.1.4

9 years ago

0.1.3

9 years ago

0.1.2

9 years ago

0.1.1

9 years ago

0.1.0

9 years ago