Marmot-TS
    Preparing search index...

    Reads a byte string in the Marmot binary profile with a moving cursor. Read methods advance the cursor and throw BinaryDecodeError on truncated or non-canonical input.

    Index
    • get position(): number

      Current cursor position.

      Returns number

    • get remaining(): number

      Bytes not yet consumed.

      Returns number

    • Reads exactly n raw bytes (opaque name[N]).

      Parameters

      • n: number

      Returns Uint8Array

    • Asserts that the cursor has consumed the entire buffer. Use this when a document says a value is "decoded exactly".

      Returns void

    • Whether any bytes remain to be read.

      Returns boolean

    • Reads a variable-length byte string written as a QUIC varint length prefix followed by the bytes (opaque name<min..max>). Enforces the field bounds when given.

      Parameters

      Returns Uint8Array

    • Reads a QUIC variable-length integer as a bigint.

      Returns bigint

    • Reads a list written as a QUIC varint byte-length prefix followed by concatenated item encodings (Type items<V>). The body MUST decode to a whole number of items with no trailing bytes.

      Type Parameters

      • T

      Parameters

      Returns T[]