A ByteSource backed by an in-memory Uint8Array. Reads are subarray copies into the destination window. Used by tests and the resident path; note it does hold the whole buffer (that residency is the source's, not the parser's — the parser still only touches a window).

Implements

Constructors

Accessors

Methods

Constructors

  • Parameters

    • buffer: Uint8Array<ArrayBufferLike>

      The backing bytes.

    Returns BufferByteSource

Accessors

  • get byteLength(): number
  • Returns number

    The buffer length.

Methods

  • Parameters

    • offset: number

      Absolute source offset to read from.

    • length: number

      Maximum number of bytes to read.

    • into: Uint8Array<ArrayBufferLike>

      Destination buffer.

    • intoOffset: number

      Offset within into to write at.

    Returns number

    The number of bytes copied.