2.1.0 • Published 8 years ago

msb128 v2.1.0

Weekly downloads
4
License
MIT
Repository
-
Last release
8 years ago

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 >

API

read (buf)

write (n)

2.1.0

8 years ago

2.0.1

10 years ago

2.0.0

10 years ago

1.0.0

10 years ago