Skip to content

dwbinns/buffer-io

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Javascript buffer reader and writer

Resources

Stars

Watchers

Forks

Packages

No packages published