@zip.js/zip.js
    Preparing search index...

    Interface HttpRangeOptions

    Represents options passed to the constructor of HttpRangeReader and HttpReader.

    interface HttpRangeOptions {
        checkResourceChanges?: boolean;
        headers?: Iterable<[string, string], any, any> | Map<string, string>;
        maximumRangeSize?: number;
        useXHR?: boolean;
        fetch?(input: string, init?: RequestInit): Promise<Response>;
    }

    Hierarchy (View Summary)

    Index
    checkResourceChanges?: boolean

    true to throw an ERR_HTTP_RESOURCE_CHANGED error when the ETag, Last-Modified or total size headers returned by a range request differ from the ones returned by the first range request, i.e. when the resource has been modified while being read. Headers missing from the responses are ignored, note that Access-Control-Expose-Headers must include them when the resource is fetched cross-origin.

    true
    
    headers?: Iterable<[string, string], any, any> | Map<string, string>

    The HTTP headers.

    maximumRangeSize?: number

    The maximum size in bytes of the range requests sent to read the data of an entry. The data is read with as many range requests as necessary, each response body being streamed, so that the size of a request never depends on the size of the entry.

    Because response bodies are streamed with backpressure, this value does not bound how much data is buffered in memory; it bounds the byte span, and therefore the lifetime, of each individual range request. Smaller windows keep each request short-lived, which avoids the idle or duration timeouts enforced by servers, CDNs and proxies when a slow consumer holds a connection open, and avoids relying on the server honoring very large ranges. Set it to Infinity to disable windowing and read each entry with a single range request covering its whole remaining length.

    16777216
    
    useXHR?: boolean

    true to rely XMLHttpRequest instead of fetch to fetch data.

    false
    
    • The function used to fetch the data. It takes precedence over HttpRangeOptions#useXHR when set. The returned object must expose the status, statusText and headers properties, and the arrayBuffer() method of the Response class.

      Parameters

      • input: string
      • Optionalinit: RequestInit

      Returns Promise<Response>

      fetch