Packages

object ZipStream

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.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ZipStream
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. final class Entry extends Zippable

    An entry to be written into the zip file.

    An entry to be written into the zip file.

    Note

    These are NOT serializable, as they contain a stream Source.

  2. case class EntryMetadata (name: String, creation: Option[Instant] = None, lastAccess: Option[Instant] = None, lastModified: Option[Instant] = None, comment: Option[String] = None, extra: Option[Array[Byte]] = None) extends Product with Serializable

    The metadata associated with a single entry in a zip file.

  3. sealed trait EntryStorage extends AnyRef
  4. final class ExistingZip extends Zippable
  5. sealed trait Zippable extends AnyRef

    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.

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. val defaultFileBuffer: Option[Int]

    The default buffer size when writing zipped data to a file.

  7. val defaultFlowBuffer: Option[Int]

    The default buffer size when outputting zipped data as a stream.

  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
  12. def hashCode(): Int
    Definition Classes
    AnyRef → Any
  13. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  14. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  15. final def notify(): Unit
    Definition Classes
    AnyRef
  16. final def notifyAll(): Unit
    Definition Classes
    AnyRef
  17. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  18. def toFile(path: Path, existingFile: ExistingFile = ExistingFile.Fail, buffer: Option[Int] = defaultFileBuffer, level: Option[Int] = None)(implicit ec: ExecutionContext): Sink[Zippable, Future[IOResult]]

    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.

    path

    the location of the file to be written.

    existingFile

    what to do if there is already a file at the provided path.

    buffer

    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.

    ec

    the execution context to use for any callback operations. This context will not be used for any long-running or blocking operations.

  19. def toStream(buffer: Option[Int] = defaultFlowBuffer, level: Option[Int] = None)(implicit ec: ExecutionContext): Flow[Zippable, ByteString, Future[IOResult]]

    A zip compressor that takes in entries and flows out bytes.

    A zip compressor that takes in entries and flows out bytes.

    buffer

    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.

    ec

    the execution context to use for any callback operations. This context will not be used for any long-running or blocking operations.

  20. def toString(): String
    Definition Classes
    AnyRef → Any
  21. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  22. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  23. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  24. object DeflateEntry extends EntryStorage with Product with Serializable
  25. object EntryMetadata extends Serializable
  26. object EntryStorage
  27. object ExistingZip
  28. object StoreEntry extends EntryStorage with Product with Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped