
Security News
Feross on the 10 Minutes or Less Podcast: Nobody Reads the Code
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.
bsdiff-nodejs
Advanced tools
An binary diff and patch library based on bsdiff algorithm for NodeJS (Windows, Mac, Linux).
An binary diff and patch library based on bsdiff algorithm for NodeJS (Windows, Mac, Linux)
Install as a dependency for your project:
npm install --save bsdiff-nodejs
const bsdiff = require('bsdiff-nodejs');
bsdiff.diff(oldFile, newFile, patchFile, function(result, err) {}); // Async
bsdiff.patch(oldfile, newfile, patchfile, function(result, err) {}); // Async
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, function(result, err) {
if(err) return console.log('Error:', err);
console.log(result + "%");
if(result === 100) {
console.log("Patch");
bsdiff.patch(oldFile, generatedFile, patchFile, function(result, err) {
if(err) return console.log('Error:', err)
console.log(result + "%");
});
}
});
Copyright 2003-2005 Colin Percival
FAQs
An binary diff and patch library based on bsdiff algorithm for NodeJS (Windows, Mac, Linux).
The npm package bsdiff-nodejs receives a total of 240 weekly downloads. As such, bsdiff-nodejs popularity was classified as not popular.
We found that bsdiff-nodejs demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Security News
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.

Research
/Security News
Campaign of 108 extensions harvests identities, steals sessions, and adds backdoors to browsers, all tied to the same C2 infrastructure.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.