$ npm install binary-diff
const bsdiff = require('binary-diff')
const bufA = Buffer.from('abcd')
const bufB = Buffer.from('abef')
const diffBuffer = bsdiff(bufA, bufB)
bsdiff(old: Buffer, new: Buffer) : Buffer
MIT © Benoit Lemaire
Modification of original implementation from :