Package Exports
- @hazae41/binary
Readme
Zero-copy bytes reader and writer 🏎️
npm i @hazae41/binaryCurrent features
- 100% TypeScript and ESM
- Zero-copy reading and writing
- No external dependency
- Compatible with both Uint8Array and Buffer
- Unit tested
Usage
const binary = Binary.alloc(3)const binary = Binary.allocUnsafe(3)const binary = new Binary(Buffer.from([0x1, 0x2]))binary.writeUint8(123)
binary.writeUint16(1234)