This is a Javascript port of XDelta3 C++ decoder.
See the XDelta3 website for infomation on XDelta3: http://xdelta.org/
XDelta3 is written in C and can compress, make diffs, and decode (re-expand)
binary as well as text files. As a file compressor XDelta3 deltas are slightly
larger than the same file compressed with gzip. However, depending on the data,
XDelta3 diffs can be dramatically smaller than the compressed files.
This port to Javascript only implements the decoder. To use this Javacript code
use the XDelta3 C code to diff or compress files and use this Javascript code to
decode the files in the browser.
This port was done by adding print statements to the C code and then making the
Javascript mirror the C code. When decoding files the outputs of the C and
Javascript code should be identical. Meld is a useful tool for comparing the 2
print outputs. The debug_save() routine can be used to save the Javascript
print outputs without the console line numbers.
To make changes to this code:
compile the XDelta C code using the C files with the print statements
decode a test file using the C code and save the print statements in a file
modify the xdelta3_decoder_with_debug.js
decode the same test file in the browser
copy the dev console log to a file
verify that the C and Javascript print statements are identical
This Javascript has be tested on smaller (300KB) files.
This code is in a very rough state.
This is a Javascript port of XDelta3 C++ decoder. See the XDelta3 website for infomation on XDelta3: http://xdelta.org/
XDelta3 is written in C and can compress, make diffs, and decode (re-expand) binary as well as text files. As a file compressor XDelta3 deltas are slightly larger than the same file compressed with gzip. However, depending on the data, XDelta3 diffs can be dramatically smaller than the compressed files.
This port to Javascript only implements the decoder. To use this Javacript code use the XDelta3 C code to diff or compress files and use this Javascript code to decode the files in the browser.
This port was done by adding print statements to the C code and then making the Javascript mirror the C code. When decoding files the outputs of the C and Javascript code should be identical. Meld is a useful tool for comparing the 2 print outputs. The debug_save() routine can be used to save the Javascript print outputs without the console line numbers.
To make changes to this code:
This Javascript has be tested on smaller (300KB) files.