@cityjson/flatcitybuf
    Preparing search index...

    Class BlobRangeReader

    RangeReader over a Blob -- or a File, which extends it, so this is what backs FcbReader.fromBlob for a file picker or a drop event.

    Holds only a reference: each read is a Blob.slice().arrayBuffer(), so a multi-gigabyte upload is never materialised in memory. There is no OS resource behind it and nothing to close.

    Implements

    Index
    • Resolves to EXACTLY length bytes starting at offset, or rejects with an FcbError. Never returns a short buffer, and never clamps a range that crosses the end of the resource. The returned array MAY be a view into a buffer the reader reuses on its next call, so a caller that needs the bytes to outlive the next read must copy them.

      Parameters

      • offset: number
      • length: number
      • Optionalopts: ReadOpts

      Returns Promise<Uint8Array<ArrayBufferLike>>

    • The resource's total byte length. Synchronous by contract: every source learns its size when it opens (a stat, blob.size, or a Content-Range at open time), so the reader's layout arithmetic never has to await.

      Returns number