Package-level declarations

Types

Link copied to clipboard

A configuration for the Compression plugin.

Link copied to clipboard

A Compression encoder.

Link copied to clipboard

A builder for compression encoder configuration.

Link copied to clipboard
data class CompressionEncoderConfig(val name: String, val encoder: CompressionEncoder, val conditions: List<ApplicationCall.(OutgoingContent) -> Boolean>, val priority: Double)

An encoder configuration for the Compression plugin.

Link copied to clipboard
data class CompressionOptions(val encoders: Map<String, CompressionEncoderConfig> = emptyMap(), val conditions: List<ApplicationCall.(OutgoingContent) -> Boolean> = emptyList())

A configuration for the Compression plugin.

Link copied to clipboard

A builder for conditions.

Link copied to clipboard

Implementation of the deflate encoder.

Link copied to clipboard

Implementation of the gzip encoder.

Link copied to clipboard

Implementation of the identity encoder.

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

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

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.

Properties

Link copied to clipboard

A plugin that provides the capability to compress a response body. You can use different compression algorithms, including gzip and deflate, specify the required conditions for compressing data (such as a content type or response size), or even compress data based on specific request parameters.