MoQ is under active development. APIs and protocols may change between releases.

Skip to content

@moq/binary ​

npm

Opaque payloads over @moq/net tracks, in two modes:

  • Snapshot: lossy latest-value, one payload per group.
  • Stream: lossless append-log in a single group.

The bytes are never inspected. Compression is @moq/flate, the same group-scoped DEFLATE @moq/json uses.

Config is the codec options. Producer.Config / Consumer.Config add the track. Compression is a shared "none" | "deflate" enum, not a boolean: both sides set the same field.

ts
import { Snapshot } from "@moq/binary";

const producer = new Snapshot.Producer({ track, compression: "deflate" });
producer.update(payload);

The Rust twin is moq-binary.

Licensed under MIT or Apache-2.0