@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.
Follow the common installation tutorial
- 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
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