/n software Connectors for MuleSoft
Version 22.0 [Build 8376]

Gzip Modules

Properties   Config Settings  

The GZIP transformer implements a gzip compressor and decompressor, compliant to RFC 1952 and compatible with the UNIX gzip and gunzip utilities.

Remarks

The GZIP module adds compression and decompression capabilities to your Mule Project.The GZIP file format is typically used only to archive a single file. Accordingly, the operation of the module is simpler than that of other modules.

GZIP Compress Module

The GZIP Compress Single operation compresses a single file. The module reads the input data in the payload and processes it into binary compressed data. When the operation completes, the module writes the bytes of the GZIP-formatted file to the payload of the Mule message as output.

Compression strength is regulated by the CompressionLevel property. Advanced configuration can be specified in the Other property.

Compress Example

To get started, simply provide the module a message to compress. Do this by setting the payload of a Mule Message to the Binary input data before it arrives at the Compress operation. For example, add a File Read Connector to your flow and add GZIP Compress behind it. There is no need to transform the output of the File Read Connector before passing it to the GZIP Compress operation.

No additional configuration is necessary to begin compressing data. To write the compressed data to disk, add a File Write connector behind the GZIP Compress operation and specify the Path and Content. The output of Compress is the Binary of the resulting GZIP-formatted file in the message payload which can be passed directly to the File Write connector.

GZIP Decompress Module

The GZIP Decompress Single operation decompresses a single file. The module reads the input data in the payload and processes it into binary decompressed data. When the operation completes, the module writes the decompressed bytes to the payload of the Mule message.

Decompress Example

To get started, simply provide the module a message to decode. Do this by setting the payload of a Mule Message to the Binary input data before it arrives at the Decompress operation. For example, add a File Read Connector in front of GZIP Decompress. There is no need to transform the output of the File Read Connector before passing it to the GZIP Decompress operation.

No additional configuration is necessary to begin decompressing data. To write the decompressed file to disk, add a File Write connector behind the GZIP Decompress operation and specify the Path and Content. The output of the Decompressor in the payload is Binary decompressed data and can be passed directly to the File Write connector.

Compressor Property List


The following is the full list of the properties of the compressor Module with short descriptions. Click on the links for further details.

CompressionLevelThe compression level to use.
FileCompressedNameFilename, as stored inside of the archive.
LogFileThe file to write logging information to at runtime.
LogModeWhat information gets logged during component execution.
LogTypeHow information gets logged during component execution.
OtherDefines a set of configuration settings to be used by the transformer.
RuntimeLicenseSpecifies the component runtime license key.
TempPathA temporary directory where uncompressed and compressed data can be stored.

Decompressor Property List


The following is the full list of the properties of the decompressor Module with short descriptions. Click on the links for further details.

LogFileThe file to write logging information to at runtime.
LogModeWhat information gets logged during component execution.
LogTypeHow information gets logged during component execution.
OtherDefines a set of configuration settings to be used by the transformer.
RuntimeLicenseSpecifies the component runtime license key.
TempPathA temporary directory where uncompressed and compressed data can be stored.

Encoder Property List


The following is the full list of the properties of the encoder Module with short descriptions. Click on the links for further details.

CompressionLevelThe compression level to use.
FileCompressedNameFilename, as stored inside of the archive.
LogFileThe file to write logging information to at runtime.
LogModeWhat information gets logged during component execution.
LogTypeHow information gets logged during component execution.
OtherDefines a set of configuration settings to be used by the transformer.
RuntimeLicenseSpecifies the component runtime license key.
TempPathA temporary directory where uncompressed and compressed data can be stored.

Decoder Property List


The following is the full list of the properties of the decoder Module with short descriptions. Click on the links for further details.

LogFileThe file to write logging information to at runtime.
LogModeWhat information gets logged during component execution.
LogTypeHow information gets logged during component execution.
OtherDefines a set of configuration settings to be used by the transformer.
RuntimeLicenseSpecifies the component runtime license key.
TempPathA temporary directory where uncompressed and compressed data can be stored.

Config Settings


The following is a list of config settings for the Module with short descriptions. Click on the links for further details.

SuggestCompressedNameWhether to suggest a file name.

CompressionLevel Property (Gzip Module)

The compression level to use.

Data Type

Integer

Default Value

4

Remarks

This property specifies the level of compression to be used, between 1 and 6. Higher values will cause the module to compress better; lower values will cause the module to compress faster.

Storing without compression is not supported for Gzip.

This property is not available in the Decompressor/Decoder.

FileCompressedName Property (Gzip Module)

Filename, as stored inside of the archive.

Data Type

String

Default Value

""

Remarks

FileCompressedName contains the name of the compressed file, as stored within the gzip header.

This field should generally be set with a relative path or with no path at all. The exact interpretation of the path is left to the decompression software; generally, pathnames will be interpreted as relative to a base directory, and these subdirectories will be created as needed. Absolute pathnames will not be interpreted correctly by the connector, and may or may not be interpreted correctly by other decompression software.

Paths should be specified in standard (UNIX) format. They may also be specified in the format native to the host operating system, in which case they will be immediately converted.

It is not usually necessary to manually set the value of this property; it will be assigned by the connector when compressing if it is not specified.

This property is not available in the Decompressor/Decoder.

LogFile Property (Gzip Module)

The file to write logging information to at runtime.

Data Type

String

Default Value

""

Remarks

To write logging information to a file instead of using the connector's logging API, set this property to a valid file on disk and set the LogType property to "File".

LogMode Property (Gzip Module)

What information gets logged during component execution.

Data Type

Enumeration

Possible Values

Verbose (0)
Info (1)
Warning (2)
Error (3)
Fatal (4)

Default Value

3

Remarks

This property controls what information the connector logs. The possible values have the following affect on the connector's behavior:

VerboseThe connector will report all information regarding the transport.
InfoThe connector will report all major operations, as well as all warnings and errors.
WarningThe connector will report any conditions that could result in unpredictable behavior as well as errors.
ErrorThe connector will report all errors that prevent normal operations from completing.
FatalThe connector will report only serious errors that cause the connector to completely stop functioning.

LogType Property (Gzip Module)

How information gets logged during component execution.

Data Type

Enumeration

Possible Values

None (0)
Console (1)
File (2)

Default Value

1

Remarks

This property controls where the connector will log the information. The possible values have the following affect on the connector's behavior:

NoneThe connector will not report any logging information.
ConsoleThe connector will report all logging information to the console.
FileThe connector will report all logging information to a file. The desired file must be specified in the LogFile when this type has been selected.

Other Property (Gzip Module)

Defines a set of configuration settings to be used by the transformer.

Data Type

String

Default Value

""

Remarks

The module accepts one or more configuration settings. These settings are similar in functionality to properties, but they are rarely used. In order to avoid "polluting" the property namespace of the module, access to these internal properties is provided through the Other property.

The Other property may be set to one or more configuration settings (name/value pairs). Set one setting per line. For example: configname1=value1 configname2=value2

RuntimeLicense Property (Gzip Module)

Specifies the component runtime license key.

Data Type

String

Default Value

""

Remarks

You can use the RuntimeLicense property to set the runtime key for the connector license.

TempPath Property (Gzip Module)

A temporary directory where uncompressed and compressed data can be stored.

Data Type

String

Default Value

""

Remarks

This property indicates a temporary directory where the module can store any data before the module processes it. If TempPath is empty, the module will receive all data to memory. If set, the module will generate and write all inbound data to a temporary file in the specified directory.

Once the file is submitted to BizTalk, the module will handle closing the file stream and deleting the temporary file. However, if the module is shut down during a transfer some temporary files may be left in the directory. To ensure optimal performance, server administrators should check the directory regularly and remove old or extraneous files.

This property accepts the "%TEMP%" macro, which will be replaced with the default system temporary directory at runtime.

Note: by default, this property is empty and the module will use memory streams to store all inbound data before submitting it to BizTalk. It is recommended that you use a temporary directory when downloading large batches or batches containing large files to alleviate potential increased memory requirements.

Config Settings (Gzip Module)

The connector accepts one or more of the following configuration settings. Configuration settings are similar in functionality to properties, but they are rarely used. In order to avoid "polluting" the property namespace of the connector, access to these internal properties is provided through the Other property.

GZip Config Settings

SuggestCompressedName:   Whether to suggest a file name.

It is possible to create a Gzip archive without including the compressed filename in the header, which prevents the pipeline from populating %SourceFileName% during extraction. Set this to true to use the archive name as the file name. The default value is false.

Copyright (c) 2022 /n software inc. - All rights reserved.
/n software Connectors for MuleSoft - Version 22.0 [Build 8376]