SofaBuffers TypeScript - v0.9.0
    Preparing search index...

    Variable DecodeStatusConst

    DecodeStatus: {
        Complete: "COMPLETE";
        Incomplete: "INCOMPLETE";
        Invalid: "INVALID";
    } = ...

    The terminal outcome of a decode (MESSAGE_SPEC §7), reported identically for one-shot and streaming decode with no finish / finalize / end promotion step:

    • Complete — the bytes ended exactly at a field boundary: a valid message.
    • Incomplete — the bytes ended inside a field (an unterminated varint, a payload shorter than its declared length, an array that runs off the end, or a nested sequence never closed). Not an error — more bytes could complete it, and the caller owns end-of-input.
    • Invalid — the bytes are malformed regardless of what follows.

    IStream.end returns Complete or Incomplete (an Invalid message has already thrown from IStream.feed); the one-shot decode / Cursor path signals Incomplete and Invalid by throwing a SofabError whose code is SofabErrorCode.Incomplete or SofabErrorCode.InvalidMsg, and Complete by returning normally.

    Type Declaration

    • ReadonlyComplete: "COMPLETE"

      The bytes ended exactly at a field boundary — a valid message.

    • ReadonlyIncomplete: "INCOMPLETE"

      The bytes ended inside a field; more bytes could complete it (not an error).

    • ReadonlyInvalid: "INVALID"

      The bytes are malformed regardless of what follows.