buffer-io
v2.3.0
Published
JavaScript buffer reader and writer
Downloads
7
Readme
JavaScript Buffer IO
Reader and writer for Node buffers and Uint8Arrays
Usage
npm install buffer-io
import { BufferReader, BufferWriter } from 'buffer-io';
const data = 0x12345678;
let bufferWriter = new BufferWriter();
bufferWriter.writeU32(0x12345678);
let bufferReader = new BufferReader(bufferWriter.getUint8Array());
console.log(bufferReader.readU32() == data);
Tests
run:
npm test