Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Applies to: ✅ Azure Data Explorer ✅ Azure Monitor ✅ Microsoft Sentinel
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.