Files
skills/plugins/document-navigator/docs/foundation/bitpacker/bitpacker-streaming
admin 9bf56a806b Move docs/ package mirror into document-navigator plugin
Relocate the ~6k-file docs tree from the repo root into
plugins/document-navigator/docs/ so the plugin is self-contained and
portable. docs/superpowers/ (specs and plans) stays at the repo root.

Moved via cp+rm rather than git mv because directory rename() fails with
EPERM on this WSL /mnt DrvFs mount; git rename-detection pairs the
identical-content files at commit time.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-30 01:10:00 +01:00
..

@suaveplan/bitpacker-streaming - Bitpacker streaming plugin

Summary

Streaming APIs for bitpacker including chunked packing/unpacking and true TransformStream support with framing.

Documentation tree

  • defaults — (no submodules)
  • otel — (no submodules)
  • register-schemas — Idempotent integration with @suaveplan/schema-registry for the @suaveplan/bitpacker-streaming package. Exposes `reg…
    • register-schemas — Idempotent integration with @suaveplan/schema-registry for the @suaveplan/bitpacker-streaming package. Exposes `reg…
  • streaming-bit-packer — (no submodules) - streaming-bit-packer.schema — Zod schemas for the o…
    • streaming-bit-packer — (no submodules) - streaming-bit-packer.schema — Zod schemas for the o…
    • streaming-bit-packer.schema — Zod schemas for the option bundles consumed by StreamingBitPacker and its peer streaming helpers (packStream, `unpa…
  • transform — (no submodules) - transform.schema — Zod schemas for the option bundl…
    • transform — (no submodules) - transform.schema — Zod schemas for the option bundl…
    • transform.schema — Zod schemas for the option bundles consumed by createPackTransformStream, createUnpackTransformStream, and the fram…
  • index — Path: bitpacker-streaming/src/index.ts Export: See source for details.
- [default-clock](./src/defaults/default-clock.md) — _(no submodules)_- [otel](./src/otel/instruments.md) — _(no submodules)_- [instruments](./src/otel/instruments.md) — _(no submodules)_- [streaming-bit-packer](./src/streaming-bit-packer/streaming-bit-packer.md) — _(no submodules)_- streaming-bit-packer.schema — Zod schemas for the o…
  • streaming-bit-packer — (no submodules)- streaming-bit-packer.schema — Zod schemas for the o…
  • streaming-bit-packer.schema — Zod schemas for the option bundles consumed by StreamingBitPacker and its peer streaming helpers (packStream, `unpa…
  • transform — (no submodules)- transform.schema — Zod schemas for the option bundl…
    • transform — (no submodules)- transform.schema — Zod schemas for the option bundl…
    • transform.schema — Zod schemas for the option bundles consumed by createPackTransformStream, createUnpackTransformStream, and the fram…
  • index — Path: bitpacker-streaming/src/index.ts Export: See source for details.
  • register-schemas — Idempotent integration with @suaveplan/schema-registry for the @suaveplan/bitpacker-streaming package. Exposes `reg…
  • default-clock — (no submodules)- otel — (no submodules)- instruments — (no submodules)- streaming-bit-packer — (no submodules)- streaming-bit-packer.schema — Zod schemas for the o…
    • streaming-bit-packer — (no submodules)- streaming-bit-packer.schema — Zod schemas for the o…
    • streaming-bit-packer.schema — Zod schemas for the option bundles consumed by StreamingBitPacker and its peer streaming helpers (packStream, `unpa…
  • transform — (no submodules)- transform.schema — Zod schemas for the option bundl…
    • transform — (no submodules)- transform.schema — Zod schemas for the option bundl…
    • transform.schema — Zod schemas for the option bundles consumed by createPackTransformStream, createUnpackTransformStream, and the fram…
  • index — Path: bitpacker-streaming/src/index.ts Export: See source for details.
  • register-schemas — Idempotent integration with @suaveplan/schema-registry for the @suaveplan/bitpacker-streaming package. Exposes `reg…
  • default-clock — (no submodules)- otel — (no submodules)- instruments — (no submodules)- streaming-bit-packer — (no submodules)- streaming-bit-packer.schema — Zod schemas for the o…
    • streaming-bit-packer — (no submodules)- streaming-bit-packer.schema — Zod schemas for the o…
    • streaming-bit-packer.schema — Zod schemas for the option bundles consumed by StreamingBitPacker and its peer streaming helpers (packStream, `unpa…
  • transform — (no submodules)- transform.schema — Zod schemas for the option bundl…
    • transform — (no submodules)- transform.schema — Zod schemas for the option bundl…
    • transform.schema — Zod schemas for the option bundles consumed by createPackTransformStream, createUnpackTransformStream, and the fram…
  • index — Path: bitpacker-streaming/src/index.ts Export: See source for details.
  • register-schemas — Idempotent integration with @suaveplan/schema-registry for the @suaveplan/bitpacker-streaming package. Exposes `reg…
  • default-clock — (no submodules)- otel — (no submodules) - instruments — (no submodules)- streaming-bit-packer — (no submodules) - streaming-bit-packer — (no submodules) - streaming-bit-packer.schema — Zod schemas for the option bundles consumed by StreamingBitPacker and its peer streaming helpers (packStream, `unpa…
  • transform — (no submodules) - transform — (no submodules) - transform.schema — Zod schemas for the option bundles consumed by createPackTransformStream, createUnpackTransformStream, and the fram…
  • index — Path: bitpacker-streaming/src/index.ts Export: See source for details.
  • register-schemas — Idempotent integration with @suaveplan/schema-registry for the @suaveplan/bitpacker-streaming package. Exposes `reg…

Install

bun add @suaveplan/bitpacker-streaming

Usage

import { BitPacker } from "@suaveplan/bitpacker";
import { registerDefaultStrategies } from "@suaveplan/bitpacker-strategies";
import { packToChunks, unpackFromChunks, createFramedPackStream, createFramedUnpackStream } from "@suaveplan/bitpacker-streaming";

const bp = new BitPacker();
registerDefaultStrategies(bp.strategyManager);
const schema = 255;

// Chunked packing
const chunks = packToChunks(42, schema, { chunkSize: 2 });
const value = unpackFromChunks<number>(chunks, schema);

// Transform streams with framing
const packStream = createFramedPackStream(bp, schema);
const unpackStream = createFramedUnpackStream(bp, schema);
packStream.readable.pipeTo(unpackStream.writable);

const writer = packStream.writable.getWriter();
await writer.write(42);
await writer.close();

const reader = unpackStream.readable.getReader();
const { value } = await reader.read(); // 42

Modules

  • src/index.ts — packToChunks, unpackFromChunks, unpackFromChunksAsync
  • src/transform/transform.ts — TransformStream factories with length-prefix, delimiter, fixed-size, and no-framing options