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
Ordering
- Alphabetic
- By Inheritance
Inherited
- GzipFilterConfig
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- Protected
Instance Constructors
- new GzipFilterConfig()
- new GzipFilterConfig(bufferSize: Int = 8192, chunkedThreshold: Int = 102400, threshold: Int = 0, shouldGzip: (, 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: (, 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: (, Result) => Boolean): GzipFilterConfig
- def withThreshold(threshold: Int): GzipFilterConfig
Configuration for the gzip filter
The size of the buffer to use for gzipping.
The content length threshold, after which the filter will switch to chunking the result.
The byte threshold for the response body size which controls if a response should be gzipped.
Whether the given request/result should be gzipped. This can be used, for example, to implement black/white lists for gzipping by content type.
Compression level to use for the underlying java.util.zip.Deflater instance.