delta_encoder
v1.0.0
Published
A small library for the storing or transmitting *strings* in the form of differences betwen sequential *strings* rather than complete *strings*.
Readme
A node.js delta encoder
Installation
npm install delta_encoder --saveUsage
var delta_encoder = require('delta_encoder')
var str_a = 'Look on my works, ye Mighty, and rejoice';
var str_b = 'Look on my works, ye Mighty, and despair';
// Creating a binary delta between two strings
var patch = delta_encoder.make_buffer_diff(str_a,str_b);
// Apply patch forwards from str_a to str_b
cosole.log(str_b == delta_encoder.apply_fwd_patch(str_a,patch));
// Apply patch backwards from str_a to str_b
console.log(str_a == delta_encoder.apply_bck_patch(str_b,patch));Test
npm testRelease History
- 1.0.0 First Release
