An entry to be written into the zip file.
An entry to be written into the zip file.
These are NOT serializable, as they contain a stream Source
.
The metadata associated with a single entry in a zip file.
A source of data that can be included in a stream that is constructing zipped data.
A source of data that can be included in a stream that is constructing zipped data. These provide a stream and thus they are not serializable.
The default buffer size when writing zipped data to a file.
The default buffer size when outputting zipped data as a stream.
A zip compressor that takes in entries and writes them to a file.
A zip compressor that takes in entries and writes them to a file.
the location of the file to be written.
what to do if there is already a file at the provided path.
the size (in bytes) of an optional buffer that will hold the zipped data before it is written to the file. The OS probably offers output buffering, but this can potentially reduce the number of OS-level writes that need to be made.
the compression level to use when generating the zip. Use None
to get the
default compression, which is generally a good compromise.
the execution context to use for any callback operations. This context will not be used for any long-running or blocking operations.
A zip compressor that takes in entries and flows out bytes.
A zip compressor that takes in entries and flows out bytes.
the size (in bytes) of an optional buffer that will hold the zipped data
before it is converted into ByteString
objects. Using a buffer can substantially improve
performance, as otherwise you may have many stream elements with just a few bytes in them.
the compression level to use when generating the zip. Use None
to get the
default compression, which is generally a good compromise.
the execution context to use for any callback operations. This context will not be used for any long-running or blocking operations.
Provider of streams that take in zip entries and produces zipped data as output.
This offers a number of methods that will create Akka Streams stages that can be used to write zip archives. To write to your zip, you will send in a stream of ZipStream.Entry objects, which are an abstraction of a single entry in a zip archive.
The structure of a zip archive requires that a single entry is written to completion once it is started, so you may wish to organize the incoming stream so that it does not emit an
Entry
until its data is available.For example, if the contents of a file are generated by a database query, you may wish to have the completion of the query produce the
Entry
object rather than immediately producing an entry that then executes a query to fetch the required data.