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

    Interface ZipWriterCloseOptions

    Represents the options passed to ZipWriter#close.

    interface ZipWriterCloseOptions {
        preventClose?: boolean;
        zip64?: boolean;
        onprogress?(
            progress: number,
            total: number,
            entry: EntryMetaData,
        ): void | Promise<void>;
        signCentralDirectory?(
            directory: Uint8Array,
        ): Uint8Array<ArrayBufferLike> | PromiseLike<Uint8Array<ArrayBufferLike>>;
    }

    Hierarchy (View Summary)

    Index
    preventClose?: boolean

    true to prevent closing of WritableWriter#writable.

    false
    
    zip64?: boolean

    true to use Zip64 to write the entries directory.

    false
    
    • The function called each time an entry is read/written.

      Parameters

      • progress: number

        The entry index.

      • total: number

        The total number of entries.

      • entry: EntryMetaData

        The entry being read/written.

      Returns void | Promise<void>

      An empty promise or undefined.

    • The function called for signing the central directory. The returned data (e.g. a PKCS#7 signature computed over the central directory records) is stored in a digital signature record written between the central directory and the end of central directory record, and exposed by ZipReader#digitalSignature when reading the zip file. It must not exceed 64KB, otherwise an ERR_INVALID_SIGNATURE_DATA error is thrown. zip.js stores the data as-is and does not implement the signature computation itself.

      Parameters

      • directory: Uint8Array

        The raw data of the central directory records.

      Returns Uint8Array<ArrayBufferLike> | PromiseLike<Uint8Array<ArrayBufferLike>>

      The data of the digital signature record.