New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

bsdiff-nodejs

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bsdiff-nodejs

An binary diff and patch library based on bsdiff algorithm for NodeJS (Windows, Mac, Linux).

Source
npmnpm
Version
1.0.6
Version published
Weekly downloads
241
346.3%
Maintainers
1
Weekly downloads
 
Created
Source

bsdiff-nodejs

An binary diff and patch library based on bsdiff algorithm for NodeJS (Windows, Mac, Linux)

INSTALLATION

Install as a dependency for your project:

npm install --save bsdiff-nodejs

USAGE

Use as a command-line tool:

bsdiff-nodejs diff oldfile newfile patchfile
bsdiff-nodejs patch oldfile newfile patchfile

or as a lib:

const bsdiff = require('bsdiff-nodejs');

bsdiff.diff(oldfile, newfile, patchfile);
bsdiff.patch(oldfile, newfile, patchfile);

For example:

const bsdiff = require('bsdiff-nodejs');
const path = require('path');

const oldFile = path.join(__dirname, 'resources/react-0.3-stable.zip');
const newFile = path.join(__dirname, 'resources/react-0.4-stable.zip');
const patchFile = path.join(__dirname, 'resources/react.patch');
const generatedFile = path.join(__dirname, 'resources/react-generated.zip');

bsdiff.diff(oldFile, newFile, patchFile);
bsdiff.patch(oldFile, generatedFile, patchFile);

License

Copyright 2003-2005 Colin Percival

Inspiration from:

  • https://github.com/tsyeyuanfeng/bsdp
  • https://github.com/GankLun/bsdiff-cross-platform

Keywords

bsdiff

FAQs

Package last updated on 12 Jun 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts