This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.ByteArrayOutputStream | |
import java.util.zip.Deflater | |
import java.util.zip.Inflater | |
/** | |
* Compress a string using ZLIB. | |
* | |
* @return an UTF-8 encoded byte array. | |
*/ | |
fun String.zlibCompress(): ByteArray { |