Skip to main content

Type Alias: RangeRetrieveOptions

RangeRetrieveOptions: BaseRetrieveOptions & object

Range retrieves are used to retrieve part of an image, before the rest of the data is available. This is different from streaming, below, in that the request itself uses a byte range to retrieve part of the data, and retrieves the entire request, but part of the image data. That separates the timing for the retrieve, and is essential for fast retrieve for multiple images.

Often the total size of the range is unknown due to cors issues, if so, the decodeLevel will need to be set manually here.

Type declaration

chunkSize?

optional chunkSize: number | (metadata) => number

byte range value to retrieve for initial decode Defaults to 64,000 bytes.

rangeIndex

rangeIndex: number

Defines the rangeIndex to use. Stages do not need to use sequential ranges, the missing data will be fetched as a larger fetch as required. Terminate range requests with a rangeIndex: -1 to fetch remaining data.

Defined in

packages/core/src/types/IRetrieveConfiguration.ts:129