taglib-ts
    Preparing search index...

    Module toolkit/blobStream

    Read/write IOStream backed by a Blob or File object.

    Reads are performed lazily — each BlobSegment is fetched from the blob on first access and the result is cached on the segment, so subsequent reads of the same range are purely in-memory with no async overhead. When a readBlock call spans multiple uncached segments, all outstanding arrayBuffer() calls are issued in parallel via Promise.all, minimising round-trips.

    Writes are captured in a piece table — a list of segments that are either a byte-range reference into the original blob (BlobSegment) or a small in-memory Uint8Array buffer (BufferSegment). The total logical length is maintained as a cached field so that length() and most seeks are O(1).

    The modified content can be assembled as a new Blob (preserving the source MIME type) via BlobStream.toBlob.

    Classes

    BlobStream

    Interfaces

    BlobSegment
    BufferSegment

    Type Aliases

    Segment