2.4 KiB
(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… -
transform.schema — Zod schemas for the option bundl…
-
transform.schema — Zod schemas for the option bundles consumed by
createPackTransformStream,createUnpackTransformStream, and the fram… -
transform.schema — Zod schemas for the option bundl…
-
transform.schema — Zod schemas for the option bundles consumed by
createPackTransformStream,createUnpackTransformStream, and the fram… -
transform.schema — Zod schemas for the option bundl…
-
transform.schema — Zod schemas for the option bundles consumed by
createPackTransformStream,createUnpackTransformStream, and the fram… -
transform.schema — Zod schemas for the option bundles consumed by
createPackTransformStream,createUnpackTransformStream, and the fram…
Transform Streams
Path: src/transform/transform.ts
Export: createPackTransformStream, createUnpackTransformStream, createFramedPackStream, createFramedUnpackStream, parseFrames, addFrame
What it does
True TransformStream support for BitPacker with backpressure, batching, progress callbacks, and multiple framing strategies.
Key API
| Function | Description |
|---|---|
createPackTransformStream(bp, schema, options?) |
Transform objects → Uint8Array chunks |
createUnpackTransformStream(bp, schema, options?) |
Transform Uint8Array → objects (length-prefix framing) |
createFramedPackStream(bp, schema, framing?, options?) |
Pack with explicit framing config |
createFramedUnpackStream(bp, schema, framing?, options?) |
Unpack with explicit framing config |
parseFrames(buffer, framing) |
Extract complete frames from a buffer |
addFrame(data, framing) |
Add framing to a message |
Framing Types
length-prefix— prefix with 1/2/4 byte length (default)delimiter— suffix with delimiter bytesfixed-size— pad/truncate to fixed sizenone— no framing (single message per chunk)
Depends on
BitPackerfrom@suaveplan/bitpacker
Used by
- Network streaming pipelines
- File serialization with chunked I/O