apoc.util.decompress
Syntax |
|
||
Description |
Unzips the given byte array. |
||
Arguments |
Name |
Type |
Description |
|
|
The bytearray of data to decompress. |
|
|
|
{ compression = "GZIP" :: ["GZIP", "BZIP2", "DEFLATE", "BLOCK_LZ4", "FRAMED_SNAPPY", "NONE"], charset = "UTF_8" ::["UTF-8", "UTF-16", "UTF-16BE", "UTF-16LE", "UTF-32", "US-ASCII", "ISO-8859-1"] } The default is: |
|
Returns |
|
Config parameters
The procedure support the following config parameters:
name | type | default | description |
---|---|---|---|
compression |
enum |
GZIP |
The compression algorithm used to decompress the byte[] |
charset |
enum |
UTF-8 |
The charset used to decompress the byte[] |
Usage Examples
WITH apoc.util.compress("Mätrix II 哈哈😄123", {charset: 'UTF-32'}) as compressed
RETURN apoc.util.decompress(compressed, {charset: 'UTF-32'}) AS value
value |
---|
"Mätrix II 哈哈😄123" |
WITH apoc.util.compress("Mätrix II 哈哈😄123", {compression: 'DEFLATE'}) as compressed
RETURN apoc.util.decompress(compressed, {compression: 'DEFLATE'}) AS value
value |
---|
"Mätrix II 哈哈😄123" |
WITH apoc.util.compress("Example", {charset: 'UTF-16'}) as compressed
RETURN apoc.util.decompress(compressed, {charset: 'UTF-16'}) AS value
value |
---|
"Example" |