public class CompressionOperations extends Object
| Constructor and Description |
|---|
CompressionOperations() |
| Modifier and Type | Method and Description |
|---|---|
org.mule.runtime.extension.api.runtime.operation.Result<InputStream,Void> |
compress(org.mule.runtime.api.metadata.TypedValue<InputStream> content,
CompressorStrategy compressor)
Compresses a given content using the configured format, ZIP or GZIP.
|
InputStream |
decompress(org.mule.runtime.api.metadata.TypedValue<InputStream> compressed,
DecompressorStrategy decompressor)
Decompresses a given single entry compressed content which is assumed to be in an specific format (ZIP or GZIP).
|
@MediaType(value="*/*",
strict=false)
@Summary(value="Compresses a given content using an specific format")
@Throws(value=CompressErrorProvider.class)
public org.mule.runtime.extension.api.runtime.operation.Result<InputStream,Void> compress(@Content
org.mule.runtime.api.metadata.TypedValue<InputStream> content,
@ParameterDsl(allowReferences=false) @Expression(value=NOT_SUPPORTED)
CompressorStrategy compressor)
If a problem occur while compressing the content a COULD_NOT_COMPRESS error will be thrown.
content - the content to be compressedcompressor - the compression strategy@MediaType(value="*/*",
strict=false)
@Throws(value=DecompressErrorProvider.class)
@Summary(value="Decompresses a single entry compressed content")
public InputStream decompress(@Content
org.mule.runtime.api.metadata.TypedValue<InputStream> compressed,
@ParameterDsl(allowReferences=false) @Expression(value=NOT_SUPPORTED)
DecompressorStrategy decompressor)
If the given content is not in the configured format an INVALID_ARCHIVE error will be thrown.
Compressed archives can have multiple entries, this operation can handle only single entry archives because if the archive would contain more than one the operation wouldn't know which should return, if the content has more than one entry an TOO_MANY_ENTRIES error will be thrown. For multiple entry archives use the `extract` operation of this module, which will let you choose only formats that accept multiple entries.
compressed - the content to be decompresseddecompressor - the decompression strategyCopyright © 2021 MuleSoft, Inc.. All rights reserved.