interface IBinaryReader {
    len: number;
    pos: number;
    bool(): boolean;
    bytes(): Uint8Array;
    double(): number;
    fixed32(): number;
    fixed64(): string | bigint;
    float(): number;
    int32(): number;
    int64(): string | bigint;
    sfixed32(): number;
    sfixed64(): string | bigint;
    sint32(): number;
    sint64(): string | bigint;
    skip(wireType): Uint8Array;
    string(): string;
    tag(): [number, WireType];
    uint32(): number;
    uint64(): string | bigint;
}

Properties

len: number

Number of bytes available in this reader.

pos: number

Current position.

Methods

  • Read a bool field, a variant.

    Returns boolean

  • Read a bytes field, length-delimited arbitrary data.

    Returns Uint8Array

  • Read a double field, a 64-bit floating point number.

    Returns number

  • Read a fixed32 field, an unsigned, fixed-length 32-bit integer.

    Returns number

  • Read a fixed64 field, an unsigned, fixed-length 64 bit integer.

    Returns string | bigint

  • Read a float field, 32-bit floating point number.

    Returns number

  • Read a sint32 field, a signed, zigzag-encoded 32-bit varint.

    Returns number

  • Read a int64 field, a signed 64-bit varint.

    Returns string | bigint

  • Read a sfixed32 field, a signed, fixed-length 32-bit integer.

    Returns number

  • Read a fixed64 field, a signed, fixed-length 64-bit integer.

    Returns string | bigint

  • Read a sint32 field, a signed, zigzag-encoded 32-bit varint.

    Returns number

  • Read a sint64 field, a signed, zig-zag-encoded 64-bit varint.

    Returns string | bigint

  • Skip one element on the wire and return the skipped data.

    Parameters

    Returns Uint8Array

  • Read a string field, length-delimited data converted to UTF-8 text.

    Returns string

  • Reads a tag - field number and wire type.

    Returns [number, WireType]

  • Read a int32 field, a signed 32 bit varint.

    Returns number

  • Read a uint64 field, an unsigned 64-bit varint.

    Returns string | bigint

Generated using TypeDoc