condition

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

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.