ByteReader reads values from a byte array, keeping track of position.

Constructors

Properties

readUint8: (() => number) = ...

Accessors

  • get length(): number
  • Gets the source length.

    Returns number

  • get unreadLength(): number
  • Gets the number of unread bytes.

    Returns number

Methods

  • Parameters

    • length: number

    Returns Uint8Array

  • Returns a subarray of internal buffer.

    It is not recommended it use this function, use read() instead, which will return a copy.

    Parameters

    • length: number

    Returns Uint8Array

  • Parameters

    • bitLength: number

    Returns number

  • Parameters

    • bitLength: number

    Returns number