Git Product home page Git Product logo

xdelta3-decoder-js's Introduction

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:

  1. compile the XDelta C code using the C files with the print statements
  2. decode a test file using the C code and save the print statements in a file
  3. modify the xdelta3_decoder_with_debug.js
  4. decode the same test file in the browser
  5. copy the dev console log to a file
  6. verify that the C and Javascript print statements are identical

This Javascript has be tested on smaller (300KB) files.

xdelta3-decoder-js's People

Contributors

bstell avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.