Interface ZipDirectoryEntryImportHttpOptions

Represents the options passed to ZipDirectoryEntry#importHttpContent.

interface ZipDirectoryEntryImportHttpOptions {
    checkPasswordOnly?: boolean;
    checkSignature?: boolean;
    combineSizeEocd?: boolean;
    commentEncoding?: string;
    extractAppendedData?: boolean;
    extractPrependedData?: boolean;
    filenameEncoding?: string;
    forceRangeRequests?: boolean;
    headers?: Iterable<[string, string], any, any> | Map<string, string>;
    passThrough?: boolean;
    password?: string;
    preventClose?: boolean;
    preventHeadRequest?: boolean;
    rawPassword?: Uint8Array<ArrayBufferLike>;
    signal?: AbortSignal;
    transferStreams?: boolean;
    useCompressionStream?: boolean;
    useRangeHeader?: boolean;
    useWebWorkers?: boolean;
    useXHR?: boolean;
    decodeText(value: Uint8Array<ArrayBufferLike>, encoding: string): string;
}

Hierarchy (View Summary)

Properties

checkPasswordOnly?: boolean

true to check only if the password is valid.

false
checkSignature?: boolean

true to check the signature of the entry.

false
combineSizeEocd?: boolean

true to use Range: bytes=-22 on the first request and cache the EOCD, make sure beforehand that the server supports a suffix range request.

false
commentEncoding?: string

The encoding of the comment of the entry.

extractAppendedData?: boolean

true to extract the appended data into ZipReader#appendedData.

false
extractPrependedData?: boolean

true to extract the prepended data into ZipReader#prependedData.

false
filenameEncoding?: string

The encoding of the filename of the entry.

forceRangeRequests?: boolean

true to always use Range headers when fetching data.

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

The HTTP headers.

passThrough?: boolean

true to read the data as-is without decompressing it and without decrypting it.

password?: string

The password used to decrypt the content of the entry.

preventClose?: boolean

true to prevent closing of Writer#writable when calling Entry#getData.

false
preventHeadRequest?: boolean

true to prevent using HEAD HTTP request in order the get the size of the content. false to explicitly use HEAD, this is useful in case of CORS where Access-Control-Expose-Headers: Content-Range is not returned by the server.

false
rawPassword?: Uint8Array<ArrayBufferLike>

The password used to encrypt the content of the entry (raw).

signal?: AbortSignal

The AbortSignal instance used to cancel the decompression.

transferStreams?: boolean

true to transfer streams to web workers when decompressing data.

true
useCompressionStream?: boolean

true to use the native API CompressionStream/DecompressionStream to compress/decompress data.

true
useRangeHeader?: boolean

true to use Range headers when fetching data from servers returning Accept-Ranges headers.

false
useWebWorkers?: boolean

true to use web workers to compress/decompress data in non-blocking background processes.

true
useXHR?: boolean

true to rely XMLHttpRequest instead of fetch to fetch data.

false

Methods

  • Decodes the filename and the comment of the entry.

    Parameters

    • value: Uint8Array<ArrayBufferLike>

      The raw text value.

    • encoding: string

      The encoding of the text.

    Returns string

    The decoded text value or undefined if the raw text value should be decoded by zip.js.