BaseDecoder: {
    decode: (bytes: ReadonlyUint8Array | Uint8Array, offset?: Offset) => TTo;
    read: (
        bytes: ReadonlyUint8Array | Uint8Array,
        offset: Offset,
    ) => [TTo, Offset];
}

Type Parameters

  • TTo

Type declaration

  • Readonlydecode: (bytes: ReadonlyUint8Array | Uint8Array, offset?: Offset) => TTo

    Decodes the provided byte array at the given offset (or zero) and returns the value directly.

  • Readonlyread: (bytes: ReadonlyUint8Array | Uint8Array, offset: Offset) => [TTo, Offset]

    Reads the encoded value from the provided byte array at the given offset. Returns the decoded value and the offset of the next byte after the encoded value.