Optionalchecktrue to throw an ERR_AMBIGUOUS_ARCHIVE error when the archive could be parsed differently by other
tools. This detects data before or after the zip structure (e.g. a self-extracting archive stub or a
concatenated archive), central directory records not accounted for by the end of central directory record, an
end of central directory record disagreeing with its zip64 counterpart, and duplicate filenames. When reading
the content of an entry, it also validates the local file header against the central directory record (see
ZipReaderOptions#checkAmbiguity).
OptionalcommentThe encoding of the comment of the entry.
OptionalfilenameThe encoding of the filename of the entry.
OptionalmaxThe maximum number of bytes tolerated after the zip structure before the archive is rejected. Defaults to
0 when GetEntriesOptions#strictness is "strict", 65535 when it is "balanced", and Infinity
when it is "tolerant".
An explicit value takes precedence over the strictness default at every level, so it can loosen "strict"
or reintroduce a rejection under "tolerant". It also bounds how far back the end of central directory
record is searched for, so a value smaller than the amount of data actually appended surfaces an
ERR_EOCDR_NOT_FOUND error when the record lies beyond the searched region and an
ERR_AMBIGUOUS_ARCHIVE error otherwise.
OptionalstrictnessHow tolerant the reader should be when the archive can be parsed in more than one way.
"strict": reject anything another tool could interpret differently. The end of central directory
record must sit exactly at the end of the file, no data may precede the zip structure, and the local file
headers must agree with the central directory records. Equivalent to GetEntriesOptions#checkAmbiguity
set to true."balanced": select the last end of central directory record whose comment reaches the end of the file
and that points to a central directory, ignore stale records left by in-place updates as well as records
forged inside a comment, and tolerate a self-extracting stub or up to
GetEntriesOptions#maxAppendedDataSize bytes of appended data. Throw an ERR_AMBIGUOUS_ARCHIVE
error only when two or more records reach the end of the file and each points to a central directory, which
cannot be disambiguated. A record that reaches the end of the file but points to no central directory (an
empty archive) is only selected when no record points to one."tolerant": never reject a parseable archive, except when GetEntriesOptions#maxAppendedDataSize
is set explicitly and exceeded; recover by selecting the last end of central directory record that reaches
the end of the file and points to a central directory (or, failing that, the last one that reaches the end
of the file).OptionaldecodeThe function called for decoding the filename and the comment of the entry.
The raw text value.
The encoding of the text.
The decoded text value or undefined if the raw text value should be decoded by zip.js.
OptionalonprogressThe function called each time an entry is read/written.
The entry index.
The total number of entries.
The entry being read/written.
An empty promise or undefined.
Represents the options passed to ZipReader#getEntries and ZipReader#getEntriesGenerator.