msb128
v2.1.0
Published
Read and write MSB base 128 encoded variable length integers
Downloads
1
Readme
node-msb128
Read and write variable length integers where bytes are a MSB base 128 encoding of the number. Uses indutny/bn.js under the hood to handle large integers.
Installation
`npm install node-msb128
Example
var msb = require('msb128')
var buf = new Buffer('8358', 'hex')
var n = 600
msb.read(buf)
// { res: '600', off: 2 }
msb.write(n)
// Buffer < 83 58 >