Uses the GZIP algorithm to decompress bin.
Syntax
binary decompress(binary <bin>)
Parameters
bin: required. A value of the BINARY type.
Return value
A value of the BINARY type is returned. If the input parameter is set to null, null is returned.
Examples
Example 1: Decompress the compression result of string
hello, world
, and convert the decompression result into a string. Sample statement:-- The return value is hello, world. select cast(decompress(compress('hello, world')) as string);
Example 2: The input parameter is set to null. Sample statement:
-- The return value is null. select decompress(null);
Related functions
For more information, see Other functions.