zlib_compress_to_base64_string()
Performs zlib compression and encodes the result to base64.
Note
The only supported windows size is 15.
Syntax
zlib_compress_to_base64_string(
string)
Learn more about syntax conventions.
Parameters
Name | Type | Required | Description |
---|---|---|---|
string | string |
✔️ | The string to be compressed and base64 encoded. |
Returns
- Returns a
string
that represents zlib-compressed and base64-encoded original string. - Returns an empty result if compression or encoding failed.
Example
Using Kusto Query Language
print zcomp = zlib_compress_to_base64_string("1234567890qwertyuiop")
Output
zcomp |
---|
"eAEBFADr/zEyMzQ1Njc4OTBxd2VydHl1aW9wOAkGdw==" |
Using Python
Compression can be done using other tools, for example Python.
print(base64.b64encode(zlib.compress(b'<original_string>')))
Related content
- Use zlib_decompress_from_base64_string() to retrieve the original uncompressed string.
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for