Optional Readonlystreamset when the archive is streamed to the caller rather than to a file
Add an entry from content held in memory
Add a directory entry. A trailing slash is added if missing.
Add an entry from a file on disk. The worker streams it.
Add an entry from a stream of content produced in the main thread, for content too large to want as one buffer - a table dump, say. Each chunk is acknowledged before the next is sent, so the producer runs no faster than the archive is written.
Abandon a half-built archive and close the worker. Any consumer of
stream is failed too, so a partial archive is never mistaken for a
complete one.
Optionalcause: anyComplete the archive and close the worker
StatictoBuild an archive at a path on disk. It is written where it belongs - writing it elsewhere and moving it would fail across filesystems.
Optionalpassword: stringif non-empty, entries are encrypted with the traditional
zip password scheme, as the system zip -P did
StatictoBuild an archive into a readable stream, for destinations written over
the network (S3, SFTP) or straight to a browser, so that no copy is made
on the local disk. Read stream while adding entries: the archive is
produced as it is consumed.
Optionalpassword: string
Builds a zip file, one entry at a time, on a worker thread.
finishcompletes the archive and shuts the worker down; the builder cannot be used afterwards.