@briklab/net-t
v1.1.1
Published
[Read Docs](https://briklab-docs.pages.dev/packages/net-t/introduction) [Github Repository](https://github.com/Kryft-Studios/NET-T)
Readme
@briklab/net-t
@briklab/net-t provides compact binary serialization for arrays of numbers, automatically choosing the most efficient numeric type for each value. Optimized for low-latency, low-memory communication structures.
Install
Follow the common installation tutorial
API
- Functions: bint() - Creates a new BintInstance
- Functions: bint.fromBuffer() - Creates a BintInstance from an ArrayBuffer
- Type: BintInstance - The main interface for working with binary number arrays
- Type: TypeName - Union type of supported numeric types
Quick Start
import bint from '@briklab/net-t';
const instance = bint();
instance(42); // Uint8
instance(3.14); // Float32
instance(1000000); // Uint32
const buffer = instance.toBuffer();
const restored = bint.fromBuffer(buffer);
console.log(restored.length); // 3