Rezi
    Preparing search index...

    Class BinaryReader

    Bounds-checked binary reader with cursor tracking.

    Ownership: BinaryReader borrows the input buffer; caller retains ownership. The buffer must remain valid and unmodified for the reader's lifetime.

    Index

    Constructors

    Accessors

    Methods

    • Validate that offset is 4-byte aligned; throws ZR_MISALIGNED on violation.

      Parameters

      • offset: number = ...

      Returns void

    • Read len bytes as a subarray view, advancing cursor by len bytes. The returned Uint8Array shares the underlying buffer with the reader.

      Parameters

      • len: number

      Returns Uint8Array

    • Read signed 32-bit integer (little-endian), advancing cursor by 4 bytes.

      Returns number

    • Read unsigned 32-bit integer (little-endian), advancing cursor by 4 bytes.

      Returns number

    • Advance cursor by len bytes without reading; validates bounds first.

      Parameters

      • len: number

      Returns void