All Downloads are FREE. Search and download functionalities are using the official Maven repository.

tech.figure.approval.member.group.devtools.extensions.ByteArrayExtensions.kt Maven / Gradle / Ivy

package tech.figure.approval.member.group.devtools.extensions

import java.io.ByteArrayOutputStream
import java.util.zip.GZIPOutputStream

internal fun ByteArray.gzip(): ByteArray = ByteArrayOutputStream().use { byteStream ->
    GZIPOutputStream(byteStream).use { it.write(this, 0, this.size) }
    byteStream.toByteArray()
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy