Compression Module - Mule 4 icon

Compression Module - Mule 4

(3 reviews)

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

TypeConnector
OrganizationMuleSoft
Published by
MuleSoft Organization
Published onJan 8, 2024
Asset overview

Asset versions for 2.2.x

Asset versions
VersionActions
2.2.3
2.2.1
2.2.0

Categories

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

Tags