/n software Connectors for MuleSoft

Questions / Feedback?

Bzip2 Module

Properties   Configuration Settings  

The Bzip2 transformer implements a Bzip2-compliant compressor and decompressor.

Remarks

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

Bzip2 Compressor Module

The Compressor requires an Array of uncompressed data as input, e.g. Array<InputStream>. The binary elements of the input list are compressed into a single binary file and added to the output payload.

Compress Example

To get started, add a File List connector in front of the Bzip2 Compress module and configure it to point to a target Directory Path. There is no need to transform the output of the File List connector before passing it to the Bzip2 Compressor. That is all that is required to get started. You can optionally add a File Write connector behind the Bzip2 Compress operation to write the bzip2-formatted file to disk when processing completes.

Note: To compress a single file, use a File Read connector in front of the Bzip2 Compress module instead of File List. You will need to transform the output into a list before passing it to the module. You can transform the output to a list by setting the Entries property of the Bzip2 Compress module to the following DataWeave code:


output application/java
---
[payload]

Bzip2 Decompressor Module

The Decompressor takes in binary compressed data as input. The output is an Array containing the decompressed contents of each original file. The Array elements can be accessed with a For Each scope. Note that filenames are not be preserved because Bzip2 is a data compression algorithm and not a file archiver.

Decompress Example

To get started, add a File Read connector in front of the Bzip2 Decompress module and configure it to read a bzip2-formatted file. Add the Bzip Decompress module behind it and that's it. Then you can use a For Each Scope to access each element. For example, add a For Each Scope behind the Bzip2 Decompress operation and set the collection field to payload. Then inside the For Each Scope the decompressed data is available in the payload.

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.

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.

Configuration Settings


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

MergeExtractedDataIf true, the component will merge concatenated data into one output file when decompressing.

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