Configuration

class Configuration : ConditionsHolderBuilder

Configuration builder for Compression feature

Constructors

Link copied to clipboard
fun Configuration()

Functions

Link copied to clipboard
fun build(): CompressionOptions

Builds CompressionOptions

Link copied to clipboard
fun default()

Appends default configuration having gzip and deflate.

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

Appends an encoder to the configuration

Properties

Link copied to clipboard
open override val conditions: MutableList<ApplicationCall.(OutgoingContent) -> Boolean>

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

Link copied to clipboard
val encoders: MutableMap<String, CompressionEncoderBuilder>

Encoders map by names

Extensions

Link copied to clipboard
fun Compression.Configuration.deflate(block: CompressionEncoderBuilder.() -> Unit = {})

Appends deflate encoder with default priority of 0.9

Link copied to clipboard
fun Compression.Configuration.gzip(block: CompressionEncoderBuilder.() -> Unit = {})

Appends gzip encoder

Link copied to clipboard
fun Compression.Configuration.identity(block: CompressionEncoderBuilder.() -> Unit = {})

Appends identity encoder