Optionalchecktrue to throw an ERR_AMBIGUOUS_ARCHIVE error when calling FileEntry#getData if the local
file header of the entry disagrees with its central directory record in a way that could make other tools
(e.g. streaming readers based on local file headers) interpret the entry differently. This detects mismatched
filenames, general purpose bit flags (encryption, data descriptor and language encoding flags), compression
methods, CRC-32 checksums and sizes. The extra fields are not compared because the zip specification allows
them to differ.
This is the boolean form of ZipReaderOptions#strictness: true means "strict" and false means
any value but "strict". When both options are set, the value passed to FileEntry#getData takes
precedence over the value passed to the constructor of ZipReader, and strictness takes precedence
over checkAmbiguity when both are set at the same level. false downgrades an inherited "strict" value
to "balanced" and leaves an inherited "tolerant" value unchanged.
Optionalchecktrue to verify the authentication code of entries encrypted with AES. The verification detects encrypted
data tampered or corrupted after the encryption.
Optionalchecktrue to verify the CRC-32 checksum of the entry against the value stored in the zip file. The verification
is run on the decompressed data and covers the whole read pipeline. It also applies to entries encrypted with
AES in AE-1 format. It is skipped for entries in AE-2 format because they store a zeroed CRC-32 value.
Optionalchecktrue to validate the local file header of the entry against its central directory record when calling
FileEntry#getData, false to skip that validation. This is the entry-level half of
ZipReaderOptions#checkAmbiguity, exposed on its own so it can be enabled without the archive-level
checks and disabled without giving up the rest of ZipReaderOptions#strictness. It is the only way to
validate the local file headers of a self-extracting archive, since
GetEntriesOptions#checkAmbiguity rejects prepended data outright.
true compares the filename as well, like ZipReaderOptions#strictness set to "strict"; false
compares nothing, like "tolerant". An explicit value takes precedence over the strictness default at
every level.
true when ZipReaderOptions#strictness is "strict" or "balanced", false when
it is "tolerant".
Optionalchecktrue to throw an ERR_OVERLAPPING_ENTRY error when calling FileEntry#getData if the entry
overlaps with another entry on which FileEntry#getData has already been called (with the option
checkOverlappingEntry or checkOverlappingEntryOnly set to true).
Optionalchecktrue to throw an ERR_OVERLAPPING_ENTRY error when calling FileEntry#getData if the entry
overlaps with another entry on which FileEntry#getData has already been called (with the option
checkOverlappingEntry or checkOverlappingEntryOnly set to true) without trying to read the content of the
entry.
Optionalchecktrue to check only if the password is valid.
Optionalchecktrue to check the CRC-32 checksum of the entry.
Use ZipReaderOptions#checkCrc32 instead.
Optionalpasstrue to read the data as-is without decompressing it and without decrypting it.
OptionalpasswordThe password used to decrypt the content of the entry.
Optionalpreventtrue to prevent closing of WritableWriter#writable when calling FileEntry#getData.
It only applies to the writable owned by the caller. It is ignored by the Writer instances returning the written data, such as BlobWriter or TextWriter, whose writable is created internally and must be closed for Writer#getData to resolve.
OptionalrawThe password used to encrypt the content of the entry (raw).
OptionalsignalThe AbortSignal instance used to cancel the decompression.
OptionalstrictnessHow tolerant the reader should be when the local file header of an entry disagrees with its central directory record. Any difference throws an ERR_AMBIGUOUS_ARCHIVE error.
"strict": compare the filename, the general purpose bit flag, the compression method, the CRC-32
checksum and the sizes."balanced": compare everything except the filename."tolerant": compare nothing and trust the central directory record.Every field except the filename is read from the local file header anyway, to locate the entry data, so
the comparison "balanced" performs reads no additional bytes. Comparing the filename reads the filename
bytes as well, which costs one extra read per entry whenever the local file header carries no extra field
— the common case in practice. Use ZipReaderOptions#checkLocalDirectory to request or suppress the
whole comparison explicitly.
Optionaltransfertrue to transfer stream ownership to web workers.
Optionalusetrue to use the native API CompressionStream/DecompressionStream to compress/decompress data.
When compressing, the native API is only used when level is undefined or equal to 6, see ZipWriterConstructorOptions#level.
Optionalusetrue to use web workers to compress/decompress data in non-blocking background processes.
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 FileEntry#getData and
{@link ZipFileEntry}.get*.