Skip to content

RangeSource

Random access to a file whose bytes are fetched on demand (a remote file, a Blob, a file handle). Matches the viewer’s source interface (C3a).

readonly optional blockSize?: number

The block size this source prefers fetches aligned to (HTTP: fewer, larger requests).


readonly size: number

The file’s size in bytes.

read(offset, length, options?): Promise<Uint8Array<ArrayBufferLike>>

The length bytes at offset (exactly that many: the file is at least offset + length long). Rejects when signal aborts.

number

number

AbortSignal

Promise<Uint8Array<ArrayBufferLike>>