Packages

case class GzipFilterConfig(bufferSize: Int = 8192, chunkedThreshold: Int = 102400, threshold: Int = 0, shouldGzip: (RequestHeader, Result) => Boolean = (_, _) => true, compressionLevel: Int = Deflater.DEFAULT_COMPRESSION) extends Product with Serializable

Configuration for the gzip filter

bufferSize

The size of the buffer to use for gzipping.

chunkedThreshold

The content length threshold, after which the filter will switch to chunking the result.

threshold

The byte threshold for the response body size which controls if a response should be gzipped.

shouldGzip

Whether the given request/result should be gzipped. This can be used, for example, to implement black/white lists for gzipping by content type.

compressionLevel

Compression level to use for the underlying java.util.zip.Deflater instance.

Source
GzipFilter.scala
Linear Supertypes
Serializable, Product, Equals, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. GzipFilterConfig
  2. Serializable
  3. Product
  4. Equals
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new GzipFilterConfig()
  2. new GzipFilterConfig(bufferSize: Int = 8192, chunkedThreshold: Int = 102400, threshold: Int = 0, shouldGzip: (RequestHeader, Result) => Boolean = (_, _) => true, compressionLevel: Int = Deflater.DEFAULT_COMPRESSION)

    bufferSize

    The size of the buffer to use for gzipping.

    chunkedThreshold

    The content length threshold, after which the filter will switch to chunking the result.

    threshold

    The byte threshold for the response body size which controls if a response should be gzipped.

    shouldGzip

    Whether the given request/result should be gzipped. This can be used, for example, to implement black/white lists for gzipping by content type.

    compressionLevel

    Compression level to use for the underlying java.util.zip.Deflater instance.

Value Members

  1. val bufferSize: Int
  2. val chunkedThreshold: Int
  3. val compressionLevel: Int
  4. def productElementNames: Iterator[String]
    Definition Classes
    Product
  5. val shouldGzip: (RequestHeader, Result) => Boolean
  6. val threshold: Int
  7. def withBufferSize(size: Int): GzipFilterConfig
  8. def withChunkedThreshold(threshold: Int): GzipFilterConfig
  9. def withCompressionLevel(level: Int): GzipFilterConfig
  10. def withShouldGzip(shouldGzip: BiFunction[RequestHeader, Result, Boolean]): GzipFilterConfig
  11. def withShouldGzip(shouldGzip: (RequestHeader, Result) => Boolean): GzipFilterConfig
  12. def withThreshold(threshold: Int): GzipFilterConfig