forked from plotnikoff/vcdiff.js
-
Notifications
You must be signed in to change notification settings - Fork 0
vphantom/vcdiff.js
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About this fork: I needed this module as the basis for my https://github.com/vphantom/rarch packing module and the package.json was broken. I'm keeping this fork alive until the original author possibly comes back to GitHub and merges (doesn't seem likely). About Implementation of VCDiff (RFC 3284) in Javascript. Can be run on client or server. Current implementation was ported to javascript from http://code.google.com/p/diffable/ project. According to RFC 3284: "The VCDIFF Generic Differencing and Compression Data Format." Javascript implementation uses regular Array for deltas. Usage. Say we have two strings: "abcdef" "defghiabc" and we want to calculate diff between them. Code will be as follows: var vcd = new diffable.Vcdiff(), delta; vcd.blockSize = 3; //setting blockSize to 3 (defaults to 20) delta = vcd.encode('abcdef', 'defghiabc'); console.log(delta); // [3, 3, 'ghi', 0, 3] //if we want to decode data from original string and delta: console.log(vcd.decode('abcdef', delta)); //'defghiabc'
About
VCDiff implementation in javascript (partially compliant with RFC 3284)
Topics
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published
Languages
- JavaScript 91.8%
- CSS 7.0%
- HTML 1.2%