condition

fun ConditionsHolderBuilder.condition(predicate: ApplicationCall.(OutgoingContent) -> Boolean)

Appends a custom condition to the encoder or Compression configuration. A predicate returns true when a response need to be compressed. If at least one condition is not met then the response compression is skipped.

Please note that adding a single condition removes the default configuration.