apoc.util.decompress
Function APOC Core
apoc.util.decompress(compressed, {config}) | return a string from a compressed byte[] in various format
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" |