Package-level declarations

Types

Link copied to clipboard

A configuration for the Compression plugin.

Link copied to clipboard

A builder for compression encoder configuration.

Link copied to clipboard
data class CompressionEncoderConfig(val encoder: ContentEncoder, 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.

Properties

Link copied to clipboard

List of ContentEncoder names that were used to decode request body.

Link copied to clipboard

A plugin that provides the capability to compress a response and decompress request bodies. 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.

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.