Creates the ZipWriter instance
The Writer instance where the zip content will be written.
Optionaloptions: ZipWriterConstructorOptionsThe options.
Optional Readonlyhastrue if the zip contains at least one entry that has been partially written.
Adds an entry into the zip file
The filename of the entry.
Optionalreader: The Reader instance used to read the content of the entry.
Optionaloptions: ZipWriterAddDataOptionsThe options.
A promise resolving to an EntryMetaData instance.
Writes the entries directory, writes the global comment, and returns the content of the zip file
Optionalcomment: Uint8Array<ArrayBufferLike>The global comment of the zip file.
Optionaloptions: ZipWriterCloseOptionsThe options.
The content of the zip file.
Adds an existing zip file at the beginning of the current zip. This method cannot be called after the first call to ZipWriter#add.
The Reader instance used to read the content of the zip file.
A promise resolving when the zip file has been added.
Removes an entry from the zip file. Note that the entry is not removed from the zip file, but it is not written to the entries directory.
true if the entry has been removed, false otherwise.
Represents an instance used to create a zip file.
Example
Here is an example showing how to create a zip file containing a compressed text file: