What is bint in @briklab/net-t?
bint is a high-performance, proxy-driven array designed to store numerical data using the absolute minimum byte-count possible. While a standard JavaScript array treats every number as a 64-bit float (consuming 8 bytes per slot), bint dynamically analyzes your data to pack it into the tightest binary representation (Uint8, Int16, Float32, etc.).
Key Features:
- Dynamic Packing: It automatically finds the best
Typefor your number. If you push a255, it uses 1 byte. If you push a1.5, it scales to a float. - Feels like a array: It looks and feels like a regular array (
b[0],b.length,for...of), but it’s actually a "Logic-Layer" sitting over a rawArrayBuffer. - Zero-Waste Serialization: When you call
.toBuffer(), it generates a perfectly packedArrayBufferready for transport over WebSockets or storage in IndexedDB.