Skip to content

Read and write variable length integers where bytes are a MSB base 128 encoding of the number.

Notifications You must be signed in to change notification settings

czzarr/node-msb128

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)

About

Read and write variable length integers where bytes are a MSB base 128 encoding of the number.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published