fbuffer
v1.0.8
Published
fluent buffer
Downloads
2
Readme
FBuffer
fluent buffer
Update
- add trimstring
- fix some bug
- add long type(ref)
Install
npm i fubffer
How to use
var fbuffer = require('fbuffer');
buffer writer:
var pack = fbuffer().byte(4).int(8).string('demo', 'utf8').pack();
console.log(pack);
buffer reader:
var result = fbuffer(pack).byte().int().string().unpack();
console.log(result);
buffer step reader:
var reader = fbuffer(pack, 'step');
console.log(reader.byte());
console.log(reader.int());
console.log(reader.string());
License
MIT