@actualwave/multibyte-stream

Encode JavaScript objects into compact binary streams using BitWriter and Schema with Base64 persistence.

Updated Mar 29, 2020
One-click install
npx skills add https://github.com/burdiuz/js-multibyte-stream --skill actualwave-multibyte-stream
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: @actualwave/multibyte-stream
Source: https://github.com/burdiuz/js-multibyte-stream/tree/main
Command: npx skills add https://github.com/burdiuz/js-multibyte-stream --skill actualwave-multibyte-stream

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Bit-level binary serialization for JavaScript. Pack values into the minimum number of bits — 1 bit for booleans, fewer bits for integers, and so on — then read them back with a consistent schema to minimize payload size in URL params, messages, or storage.

Core Features & Use Cases

  • BitWriter / BitReader for low-level bit I/O on any TypedArray
  • BitStream for combined read/write on a shared buffer
  • Type classes to encode/decode booleans, integers, floats, strings, arrays, objects, enums, and bigint
  • Schema to auto-infer from sample data and persist/restore via Base64

Quick Start

Create a schema from a sample object and encode it to Base64, then decode it back to verify round-tripping.

Frequently Asked Questions about @actualwave/multibyte-stream

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I minimize the payload size of JavaScript objects in URL parameters?▼

Bit-level binary serialization packs values into the minimum number of bits, such as 1 bit for booleans, and persists them via Base64 to minimize payload size in URL parameters or storage.

What is bit-level binary serialization in JavaScript?▼

Bit-level binary serialization encodes complex JavaScript objects into compact binary streams using BitWriter and BitReader, packing values into fewer bits to minimize message and storage payload sizes.

How do I encode and decode binary data using a schema in JavaScript?▼

Create a schema from a sample object to auto-infer types, encode the data into a binary stream, and persist or restore it via Base64 to ensure accurate round-trip decoding.

Does this binary serialization library support encoding floats, enums, and bigint values?▼

Yes, the type registry includes classes to encode and decode booleans, integers, floats, strings, arrays, objects, enums, and bigint values within a shared binary buffer.

Can I use BitStream for combined read and write operations on a single TypedArray?▼

Yes, BitStream provides combined read and write operations on a shared buffer, while BitWriter and BitReader handle low-level bit I/O on any TypedArray for flexible binary serialization.

When should I use bit-level encoding instead of standard JSON serialization?▼

Use bit-level encoding when payload size matters, such as in binary protocols, URL parameters, messages, or persistent storage, where packing values into minimum bits reduces footprint.