Skip to content

Kryft-Studios/NET-T

Read Docs Github Repository

@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

About

No description, website, or topics provided.

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors