Decompress

You can use this Snap to decompress the content of binary data. For example, if a File Reader Snap is configured to read a compressed file, you can use this Snap to decompress the content before passing the data to a Parser Snap. The decompression scheme can be explicitly chosen or automatically detected based on the content of the binary data. If the compression scheme is set to AUTO and the incoming data is not compressed, the raw input data is passed through without any changes.

Warning: This Snap only uncompresses the compressed files on the first level. It does not decompress the archived folders which are located at the second level and deeper. This Snap supports decompression of the following compression schemes:
  • 7ZIP
  • BZIP2 (or BZ2)
  • DEFLATE
  • GZIP
  • TAR.GZ
  • ZIP


Snap views

Type Description Examples of upstream and downstream Snaps
Input (binary) The input view accepts a document containing binary data that needs to be decompressed. This is typically compressed file content that you want to extract or decompress before further processing.
Output (binary) The output view provides the decompressed file content in the specified decompression format. The Snap supports multiple decompression schemes.

The decompressed file in the specified decompression format:

  • AUTO
  • BZIP2
  • GZIP
  • DEFLATE
  • ZIP
  • 7ZIP
  • TAR.GZ
Learn more about Error handling.

Examples

Snap settings

Note: Learn about the common controls in the Snap settings dialog.
Field/Field set Description

Label

String

Required. Specify a unique name for the Snap. Modify this to be more appropriate, especially if more than one of the same Snaps is in the pipeline.

Default value: Decompress

Example: Decompress
Scheme

Dropdown list

Required. Specify the decompression scheme to use. The available options include:
  • AUTO - Automatically detects the decompression scheme to be applied (based on the compression scheme) on the incoming documents.
  • BZIP2 - Decompresses files compressed in the BZIP2 compression scheme.
  • GZIP - Decompresses files compressed in the GZIP compression scheme.
  • DEFLATE - Decompresses files compressed in the DEFLATE compression scheme.
  • ZIP- Decompresses files compressed in the ZIP compression scheme.
  • 7Z- Decompresses files compressed in 7z compression scheme.
  • TAR.GZ - Decompresses files compressed in TAR.GZ compression scheme.
Note: Supported schemes for AUTO Scheme

AUTO scheme detection is supported for DEFLATE, GZIP, BZIP2, ZIP, 7z, and TAR.GZ compression schemes.

Default value: AUTO

Example: BZIP2

Snap execution

Dropdown list

Choose one of the three modes in which the Snap executes. Available options are:
  • Validate & Execute: Performs limited execution of the Snap and generates a data preview during pipeline validation. Subsequently, performs full execution of the Snap (unlimited records) during pipeline runtime.
  • Execute only: Performs full execution of the Snap during pipeline execution without generating preview data.
  • Disabled: Disables the Snap and all Snaps that are downstream from it.

Default value: Execute only

Example: Validate & Execute