CompressionConfig

A configuration for the Compression plugin.

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard

Properties

Link copied to clipboard

Preconditions applied to every response object to check if it should be compressed.

Link copied to clipboard

Provides access to a map of encoders.

Link copied to clipboard

Specifies if the plugin should compress response, decompress request, or both.

Functions

Link copied to clipboard

Appends a custom condition to the encoder or the Compression configuration. A predicate returns true when a response need to be compressed. If at least one condition is not met, a response isn't compressed.

Link copied to clipboard
fun default()

Appends the default configuration with the gzip, deflate, and identity encoders.

Link copied to clipboard

Appends the deflate encoder with the block configuration and the 0.9 priority.

Link copied to clipboard
fun encoder(encoder: ContentEncoder, block: CompressionEncoderBuilder.() -> Unit = {})

Appends an encoder with the block configuration.

Link copied to clipboard

Appends a content type exclusion condition to the encoder or the Compression configuration.

Link copied to clipboard

Appends the gzip encoder with the block configuration.

Link copied to clipboard

Appends the identity encoder with the block configuration.

Link copied to clipboard

Appends a content type condition to the encoder or the Compression configuration.

Link copied to clipboard

Appends a minimum size condition to the encoder or the Compression configuration.