GZIP V2
Learn more about the component and how to use it.
GZIP V2 zips a JSON or a text as a string in base64 or file. The component also compresses and decompresses files in gzip format.
This version of the component supports Double Braces. To understand how this language works, read the documentation.
Take a look at the configuration parameters of the component:
- Operation: Compress Fields compresses the fields of a JSON; Decompress Fields decompresses the files of a JSON; Compress Payload compresses a received payload; Decompress Payload decompresses a received payload; Compress File compresses a received file; Decompress File decompresses a received file.
- JSON Fields: JSON path to be compressed or decompressed, considering the fields must be separated by comma (eg.: field1,field2).
- Preserve Original: if activated, the option preserves the original fields that have a prefix with underline.
- Binary Content: this option is valid only for the Compress Fields and Compress Payload operations. If activated, the option makes the data to be treated as binary and a base64 string is expected.
- Payload: this field is valid only for the Compress Payload and Decompress Payload operations and declares what will be compressed/decompressed in the request.
- Result As File: this field is valid only for the Compress Payload and Decompress Payload operations. If activated, the option will save the result of the compression or decompression in a file.
- File Name: name of the file to be compressed.
- GZIP File Name: name of the file in gzip format.
- Fail On Error: if the option is enabled, the execution of the pipeline with error will be interrupted; otherwise, the pipeline execution proceeds, but the result will show a false value for the “success” property.
For the Compress Fields and Decompress Fields operations, the component is expected to receive a JSON with the fields configured in the JSON Fields property.
With the following configurations:
JSON Fields = field1,field2
The expected JSON must at least have:
{
"field1": "SOMETHING",
"field2": "SOMETHING"
}
For the Compress Payload and Decompress Payload operations, you must configure the Payload field to make the compression/decompression.
With the following configurations:
Payload = {{ message.field1 }}
The JSON must have this value:
{
"field1": "SOMETHING"
}
For the Compress File and Decompress File operations, you must configure the file to be compressed/decompressed and the resulting file of this operation.
File Name = file.csv
GZIP File Name = file.gzip
For the Compress Fields and Decompress Fields operations, the input message is preserved.
For the Compress Payload and Decompress Payload operations, if the output is a file:
{
"success": "true",
"fileName": "file.csv"
}
For the Compress Payload and Decompress Payload operations, if the output is a string:
{
"success": "true",
"result": "SOMETHING COMPRESSED/DECOMPRESSED"
}
For the Compress File and Decompress File operations:
{
"success": "true",
"fileName": "file.csv",
"gzipFileName": "file.csv"
}
Last modified 1mo ago