@glagan/binary-reader
v1.1.1
Published
Tool for reading binary data sequentially in JavaScript / TypeScript.
Downloads
4
Readme
Binary Reader for JavaScript/TypeScript
Tool for reading binary data sequentially in JavaScript / TypeScript
Requires DataView.getBigInt64 support for Int64/Uint64
Installation
npm install @glagan/binary-reader
Usage
import { BinaryReader } from '@glagan/binary-reader'
const data = new BinaryReader(uint8Array)
const version = data.readUint32()
const nameLen = data.readUint8()
const name = data.readArrayAsString(nameLen)
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.