network-serializer
v0.1.0
Published
A byte-level serialiser package for NodeJS
Downloads
2
Readme
network-serializer
A byte-level serialiser package for NodeJS.
Installation
npm install network-serializer
Usage
const { BinarySerializer, BinaryDeserializer } = require('network-serializer')
var ser = new BinarySerializer({ bigEndian: true })
ser.writeUInt32(0x2134)
ser.write('Hēllo Wōrld!', 'utf8')
var buf = ser.releaseBuffer()
var des = new BinaryDeserializer({ buffer: buf })
console.log("Int32", des.readUInt32())
console.log("String", des.read(14, 'utf8').toString())
Roadmap
- JSDoc for All The Things™