Skip to content
Ingvar Stepanyan edited this page Sep 11, 2013 · 5 revisions

Just use npm to install jBinary and you are set :)

npm install jbinary
var fs = require('fs');
var jBinary = require('jbinary');
var typeSet = {
  magic: ['array', 'uint8', 4]
};

jBinary.load('file.bin', typeSet, function (err, binary) {
  console.log(binary.read('magic'));
});
Clone this wiki locally