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
- Alphabetic
- By Inheritance
- GzipFilterConfig
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new GzipFilterConfig()
- 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
- val bufferSize: Int
- val chunkedThreshold: Int
- val compressionLevel: Int
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- val shouldGzip: (RequestHeader, Result) => Boolean
- val threshold: Int
- def withBufferSize(size: Int): GzipFilterConfig
- def withChunkedThreshold(threshold: Int): GzipFilterConfig
- def withCompressionLevel(level: Int): GzipFilterConfig
- def withShouldGzip(shouldGzip: BiFunction[RequestHeader, Result, Boolean]): GzipFilterConfig
- def withShouldGzip(shouldGzip: (RequestHeader, Result) => Boolean): GzipFilterConfig
- def withThreshold(threshold: Int): GzipFilterConfig