@chickenjdk/byteutils
    Preparing search index...

    Class ResizableBufferBaseAbstract

    Hierarchy (View Summary)

    Implements

    Index

    Constructors

    Properties

    length: number = Infinity
    supportsDynamicChunkSize: boolean

    Accessors

    Methods

    • A listener for changes in chunks.

      Parameters

      • chunkIndexes: number[]

        The indexes of the changed chunks.

      Returns void

    • Get a copy of the data in the buffer between two indexes. (same behavior as .slice in a Uint8Array)

      Parameters

      • indexStart: number
      • indexEnd: number

      Returns Uint8Array<ArrayBufferLike>

    • Get an array of subarrays of the internal buffers! (WARNING: mutations will edit the data in this instance) Like .get, but does not join the chunks. Also does not give you more data than we really have, making the "infinite length buffer" abstraction leaky but allocatedLength does that too.

      Parameters

      • indexStart: number

        The starting index (inclusive)

      • indexEnd: number

        The ending index (exclusive)

      Returns Uint8Array<ArrayBufferLike>[]

      Your buffers, fresh off .subarray

    • Set byte(s) in a position in the buffer

      Parameters

      • value: number | ArrayLike<number> | Uint8Array<ArrayBufferLike>

        The byte(s)

      • indexStart: number

        The starting index, or if you only provide one byte, the index, of where the data should go

      Returns void