encode To Base64Url Zlib
fun encodeToBase64UrlZlib(input: String, level: Int = Deflater.BEST_COMPRESSION, onlyIfSmaller: Boolean = true): String
Compress a UTF-8 string with zlib (DEFLATE + zlib header/Adler32) and encode as Base64URL (no padding).
If onlyIfSmaller is true and compression does not reduce size, this returns the original input string (mirrors common mobile behavior where short payloads aren’t worth compressing).
Example
val b64 = QrZlibB64.encodeToBase64UrlZlib(json)
// b64 is Base64URL with no '=' paddingContent copied to clipboard
Return
Base64URL (no padding) string of zlib-compressed bytes, or the original input if not smaller and onlyIfSmaller = true.