Compress
In this article
Overview
You can use this Snap to compress the contents of a binary stream. For example, you can connect this Snap upstream of a File Writer Snap to compress the data before upload. Learn more. If you need to archive and compress multiple files into a single ZIP file, use the ZipFile Write Snap.
Snap Type
The Compress Snap is a TRANSFORM-type Snap that transforms the binary documents.
Prerequisites
None.
Support for Ultra Pipelines
Works in Ultra Pipelines.
Limitations and Known Issues
None.
Snap Views
Type | Format | Number of Views | Examples of Upstream and Downstream Snaps | Description |
---|---|---|---|---|
Input | Binary
|
|
| The Binary file to be compressed. |
Output | Binary
|
|
| The Binary file in the specified compression format:
|
Error
| Error handling is a generic way to handle errors without losing data or failing the Snap execution. You can handle the errors that the Snap might encounter while running the Pipeline by choosing one of the following options from the When errors occur list under the Views tab:
Learn more about Error handling in Pipelines. |
Snap Settings
Asterisk ( * ): Indicates a mandatory field.
Suggestion icon (): Indicates a list that is dynamically populated based on the configuration.
Expression icon (): Indicates whether the value is an expression (if enabled) or a static value (if disabled). Learn more about Using Expressions in SnapLogic.
Add icon (): Indicates that you can add fields in the field set.
Remove icon (): Indicates that you can remove fields from the field set.
Field Name | Field Type | Description |
---|---|---|
Label*
Default Value: Compress | String | Specify a unique name for the Snap. |
Compression Scheme*
Default value: GZIP | Dropdown list | Choose one of the following compression schemes to compress the data:
|
Snap Execution
Default Value: Validate & Execute | Dropdown list | Select one of the following three modes in which the Snap executes:
|
Example
File compression (GZIP)
The following example pipeline demonstrates how to read a file and compress it using the GZIP Compression scheme. It consists of a single segment that handles the file reading and compression operations.
Configure the File Reader Snap to read the content from a file named 100MB.odt.
Configure the Compress Snap to compress the input data using the GZIP compression scheme.
Validate the Snap. On validation, the Snap compresses the output and displays the output as shown below.
Downloads
Important Steps to Successfully Reuse Pipelines
Download and import the Pipeline into SnapLogic.
Configure Snap accounts as applicable.
Provide Pipeline parameters as applicable.
Snap Pack History
Have feedback? Email documentation@snaplogic.com | Ask a question in the SnapLogic Community
© 2017-2025 SnapLogic, Inc.