zlibDeflate

suspend fun ByteArray.zlibDeflate(compressionLevel: Int = 9): ByteArray

Compresses data using DEFLATE algorithm according to RFC 1951 with zlib wrapper RFC 1950.

Receiver

the data to compress.

Return

the compressed data.

Parameters

compressionLevel

must be between 0 and 9, both inclusive.

Throws