Optionalbufferedtrue to write entry data in a buffer before appending it to the zip file.
bufferedWrite is automatically set to true when compressing more than one entry in parallel.
OptionalcommentThe comment of the entry.
OptionalcompressionThe compression method (e.g. 8 for DEFLATE, 0 for STORE).
OptionalcreationThe creation date.
This option is ignored if the ZipWriterConstructorOptions#extendedTimestamp option is set to false.
Optionaldatatrue to add a data descriptor.
When set to false, the ZipWriterConstructorOptions#bufferedWrite option will automatically be
set to true. It will be automatically set to false when it is undefined and the
ZipWriterConstructorOptions#bufferedWrite option is set to true, or when the {@link ZipWriterConstructorOptions#zipCrypto} option is set totrue. Otherwise, the default value is true`.
Optionaldatatrue to add the signature of the data descriptor.
Optionaldirectorytrue if the entry is a directory.
Optionalencryptedtrue to write encrypted data when passThrough is set to true.
OptionalencryptionThe encryption strength (AES):
Optionalexecutabletrue if the entry is an executable file.
Optionalextendedtrue to store extended timestamp extra fields.
When set to false, the maximum last modification date cannot exceed November 31, 2107 and the maximum accuracy is 2 seconds.
OptionalexternalThe external file attribute.
OptionalextraThe extra field of the entry.
OptionalgidThe Unix group id to write in the Unix extra field or as part of the external attributes.
OptionalinternalThe internal file attribute.
Optionalkeeptrue to keep the order of the entry physically in the zip file.
When set to true, the use of web workers will be improved. However, it also prevents files larger than 4GB from being created without setting the zip64 option to true explicitly.
Another solution to improve the use of web workers is to add entries from smallest to largest in uncompressed size.
OptionallastThe last access date.
This option is ignored if the ZipWriterConstructorOptions#extendedTimestamp option is set to false.
OptionallastThe last modification date.
OptionallevelThe level of compression.
The minimum value is 0 and means that no compression is applied. The maximum value is 9.
OptionalmsdosWhen provided, MS-DOS attribute flags (boolean object) to write into external file attributes low byte.
OptionalmsdosWhen provided, the low 8-bit MS-DOS attributes to write into external file attributes. Must be an integer between 0 and 255.
Optionalmstrue to write EntryMetaData#externalFileAttributes in MS-DOS format for folder entries.
OptionaloffsetThe offset of the first entry in the zip file.
Optionalpasstrue to write the data as-is without compressing it and without crypting it.
OptionalpasswordThe password used to encrypt the content of the entry.
Optionalpreventtrue to prevent closing of WritableWriter#writable.
OptionalrawThe password used to encrypt the content of the entry (raw).
Optionalsetgidtrue to set the setgid bit when writing the Unix mode.
Optionalsetuidtrue to set the setuid bit when writing the Unix mode.
OptionalsignalThe AbortSignal instance used to cancel the compression.
OptionalsignatureThe signature (CRC32 checksum) of the content. This option is ignored if the ZipWriterConstructorOptions#passThrough option is not set to true.
Optionalstickytrue to set the sticky bit when writing the Unix mode.
Optionalsupportfalse to never write disk numbers in zip64 data.
OptionaluidThe Unix owner id to write in the Unix extra field or as part of the external attributes.
OptionaluncompressedThe uncompressed size of the entry. This option is ignored if the ZipWriterConstructorOptions#passThrough option is not set to true.
OptionalunixWhich Unix extra field format to write when creating entries that include Unix metadata.
OptionalunixThe Unix mode (st_mode bits) to use when writing external attributes.
Optionalusdztrueto produce zip files compatible with the USDZ specification.
Optionalusetrue to use the native API CompressionStream/DecompressionStream to compress/decompress data.
Optionalusetrue to mark the file names as UTF-8 setting the general purpose bit 11 in the header (see Appendix D -
Language Encoding (EFS)), false to mark the names as compliant with the original IBM Code Page 437.
Note that this does not ensure that the file names are in the correct encoding.
Optionalusetrue to use web workers to compress/decompress data in non-blocking background processes.
OptionalversionThe "Version" field.
OptionalversionThe "Version made by" field.
Optionalzip64true to use Zip64 to store the entry.
zip64 is automatically set to true when necessary (e.g. compressed data larger than 4GB or with unknown size).
Optionalziptrue to use the ZipCrypto algorithm to encrypt the content of the entry. Setting it to true will also
set the ZipWriterConstructorOptions#dataDescriptor to true.
It is not recommended to set zipCrypto to true because the ZipCrypto encryption can be easily broken.
OptionalencodeThe function called for encoding the filename and the comment of the entry.
The text to encode.
The encoded text or undefined if the text should be encoded by zip.js.
OptionalonendThe function called when ending compression/decompression.
The total number of bytes (computed).
An empty promise or undefined.
OptionalonprogressThe function called during compression/decompression.
The current progress in bytes.
The total number of bytes.
An empty promise or undefined.
OptionalonstartThe function called when starting compression/decompression.
The total number of bytes.
An empty promise or undefined.
Represents the options passed to ZipWriter#add.