jdiff-js

1.0.0 • Public • Published

JDiff.js

JavaScript adaptation of JojoDiff by Joris Heirbaut. For more information and to see the API, see the JojoDiff project page on SourceForge. The project is written in C++, then cross-compiled through Emscripten so it can be used by any JavaScript client.

JojoDiff is great because it generates linear patch files, which can be applied in a very memory-efficient manner. We're using this in janpatch - a patching library for embedded systems that can run in very little memory. This allows us to bring delta updates to even the smallest devices. Having JojoDiff available as a JavaScript library makes it easier to integrate in our build tools.

Currently the library is only available as CLI application, but it'll be adapted into a proper library at some point in the near future.

Usage

  1. Install a recent version of Node.js.

  2. Install the project:

    $ npm install jdiff -g
    
  3. Use the application:

    $ jdiff ./file1 ./file2 ./patch-file
    

Compiling

  1. Install the Emscripten SDK and make sure emcc is in your PATH.

  2. Clone this repository:

    $ git clone https://github.com/janjongboom/jdiff-js
    
  3. Build the project:

    $ cd src
    $ make js
    
  4. Run the project:

    $ node ../jdiff.js
    

License

GNU General Public License version 3.0 (GPLv3). See COPYING.

Readme

Keywords

Package Sidebar

Install

npm i jdiff-js

Weekly Downloads

12

Version

1.0.0

License

GPL-3.0

Unpacked Size

2.39 MB

Total Files

46

Last publish

Collaborators

  • janjongboom1