compress

abstract suspend fun compress(bytes: ByteString, limits: CompressionLimits): ByteString(source)

Returns compressed bytes.

Implementations should enforce limits while encoding. The writer also validates the returned byte count before using it.