`npm install bitcoin-buffer
var utils = require('bitcoin-buffer')
var buf = new Buffer(8)
utils.writeUInt64LE(buf, 1, 0)
// buf = 0100000000000000
utils.writeVarInt(buf, 0xffffff, 0)
// buf = feffffff00
Writes in buf
returns an integer
returns a Buffer
returns an object of this format { res: value, offset: offset }