Skip to content

Instantly share code, notes, and snippets.

@jsumners
Last active November 1, 2015 16:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jsumners/2f8ba902223d55b8abc8 to your computer and use it in GitHub Desktop.
Save jsumners/2f8ba902223d55b8abc8 to your computer and use it in GitHub Desktop.
'use strict';
const assert = require('assert');
const fs = require('fs');
const dataBuffer = fs.readFileSync(__dirname + '/data.bin');
const number = dataBuffer.readUInt16BE(0);
console.log(`number = ${number}`);
assert.equal(number, 1024);
@jsumners
Copy link
Author

jsumners commented Nov 1, 2015

Results in number being 0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment