Interface EntryGetDataOptions

Represents the options passed to Entry#getData and {@link ZipFileEntry}.get*.

interface EntryGetDataOptions {
    checkSignature?: boolean;
    password?: string;
    preventClose?: boolean;
    rawPassword?: Uint8Array;
    signal?: AbortSignal;
    transferStreams?: boolean;
    useCompressionStream?: boolean;
    useWebWorkers?: boolean;
    onend?(computedSize): Promise<void>;
    onprogress?(progress, total): Promise<void>;
    onstart?(total): Promise<void>;
}

Hierarchy (view full)

Properties

checkSignature?: boolean

true to check the signature of the entry.

Default Value

false
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

  • The function called when ending compression/decompression.

    Parameters

    • computedSize: number

      The total number of bytes (computed).

    Returns Promise<void>

    An empty promise or undefined.

  • The function called during compression/decompression.

    Parameters

    • progress: number

      The current progress in bytes.

    • total: number

      The total number of bytes.

    Returns Promise<void>

    An empty promise or undefined.

  • The function called when starting compression/decompression.

    Parameters

    • total: number

      The total number of bytes.

    Returns Promise<void>

    An empty promise or undefined.