Rezi
    Preparing search index...

    Class BinaryWriter

    Bounds-checked binary writer with cursor tracking.

    Ownership: BinaryWriter owns its internal buffer. The buffer returned by finish() is a subarray view; caller should copy if the writer will be reused.

    Index

    Constructors

    Accessors

    Methods

    • Return the written portion of the buffer as a Uint8Array view. The returned view shares underlying memory with the writer.

      Returns Uint8Array

    • Pad cursor to next 4-byte boundary with zero bytes. Required before writing U32/I32 values and for format compliance.

      Returns void

    • Write raw bytes, advancing cursor by bytes.byteLength.

      Parameters

      • bytes: Uint8Array

      Returns void

    • Write signed 32-bit integer (little-endian), advancing cursor by 4 bytes. Requires cursor to be 4-byte aligned.

      Parameters

      • v: number

      Returns void

    • Write unsigned 32-bit integer (little-endian), advancing cursor by 4 bytes. Requires cursor to be 4-byte aligned.

      Parameters

      • v: number

      Returns void

    • Write unsigned 8-bit integer, advancing cursor by 1 byte.

      Parameters

      • v: number

      Returns void