A11 TypeScript API - v0.7.0
    Preparing search index...

    Class Chunk

    Smallest typed payload carried through an A11 node.

    A chunk contains owned bytes plus optional metadata, or a ref to data held elsewhere. Serialization registries turn application objects into chunks; NodeFragments add identity, sequence, and finality for streaming. An empty octet-stream chunk is the explicit null/end marker used by unary flows.

    Index
    data: Uint8Array

    Inline payload bytes.

    metadata: ChunkMetadata | null

    Description of the payload.

    ref: string

    External content reference, or an empty string for inline data.

    • get approxBytes(): number

      Approximate encoded field and payload size.

      Returns number

    • get isEmpty(): boolean

      Whether the chunk contains neither inline nor referenced data.

      Returns boolean

    • get isNull(): boolean

      Whether this is the explicit null chunk used as a final terminator.

      Returns boolean

    • get mimetype(): string

      MIME type from metadata, or an empty string.

      Returns string

    • Encode the concatenated MessagePack chunk record.

      Returns StatusOr<Uint8Array<ArrayBufferLike>>