Interface ZipReaderConstructorOptions

Represents the options passed to the constructor of ZipReader, and {@link ZipDirectory}#import*.

interface ZipReaderConstructorOptions {
    checkSignature?: boolean;
    commentEncoding?: string;
    extractAppendedData?: boolean;
    extractPrependedData?: boolean;
    filenameEncoding?: string;
    password?: string;
    preventClose?: boolean;
    rawPassword?: Uint8Array;
    signal?: AbortSignal;
    transferStreams?: boolean;
    useCompressionStream?: boolean;
    useWebWorkers?: boolean;
    decodeText?(value, encoding): string;
}

Hierarchy (view full)

Properties

checkSignature?: boolean

true to check the signature of the entry.

Default Value

false
commentEncoding?: string

The encoding of the comment of the entry.

extractAppendedData?: boolean

true to extract the appended data into ZipReader#appendedData.

Default Value

false
extractPrependedData?: boolean

true to extract the prepended data into ZipReader#prependedData.

Default Value

false
filenameEncoding?: string

The encoding of the filename of the entry.

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.

Default Value

false
rawPassword?: Uint8Array

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.

Default Value

true
useCompressionStream?: boolean

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

Default Value

true
useWebWorkers?: boolean

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

Default Value

true

Methods

  • Decodes the filename and the comment of the entry.

    Parameters

    • value: Uint8Array

      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.