Compression Module - Mule 4 icon

Compression Module - Mule 4

(1 review)

home

The Compression module provides functionality for handling compressed data.

Compressing Data

The zip operation compresses data using the ZIP format.

Actual compression occurs in a lazy manner. This operation returns a stream and actual compression happens as the stream is consumed. Any errors that may rise during compression do not occur in this operation, but in those which are consuming the returned stream.

The following example will compress the current message payload:

<compression:zip />

You can also use embedded DataWeave transformations to compress a custom content:

<compression:zip>
    <compression:content>
        #[payload.userData.image]
    </compression:content>
</compression:zip>

Decompressing data

The unzip operation decompresses data using the ZIP format.

Actual decompression occurs in a lazy manner. This operation returns a stream and actual decompression will happen as the stream is consumed. Not all errors that may rise during compression will occur in this operation. Some might actual appear in the components that consume this stream.

The following example will decompress the current message payload:

<compression:unzip />

You can also use embedded DataWeave transformations to compress a custom content:

<compression:unzip>
    <compression:content>
        #[payload.userData.compressedImage]
    </compression:content>
</compression:unzip>

Reviews

Compression Module - Mule 4 doesn't have any reviews yet
Dependency Snippets
Opens dependency snippets modal
TypeConnector
OrganizationMuleSoft
Created byMuleSoft Organization
Published onJun 25, 2020
Asset overview

Asset versions for 2.1.x

VersionRuntime versionActions
2.1.14.1.1
2.1.04.1.1

Categories

Difficulty
AverageNo values left to add
Functions
TechnologyNo values left to add
Level
SelectNo values left to add

Tags