Login to follow
Gzip

Gzip (ODC)

Stable version 2.0.0 (Compatible with ODC)
Uploaded on 24 Jul by valantic LCS
Gzip

Gzip (ODC)

Documentation
2.0.0
Actions


GZip_StringCompress

Compresses a text value and returns the compressed binary (gzip format).

ParameterDirectionOutSystems typeNotes
InTextInputTextMust not be null. Empty text ("") is valid and compresses to a small non-empty binary.
OutBinaryOutputBinary DataGzip-compressed bytes.


Example

Input:

{ "InText": "Hello OutSystems!" }

Output (binary, shown as base64 for illustration):

{ "OutBinary": "H4sIAAAAAAAAC/NIzcnJVyjPL8pJ4QIAlyDA3RIAAAA=" }

Errors

  • If InText is null (not applicable when the input is bound to a Text variable, which defaults to "", but relevant if built dynamically), the action throws an exception with a clear message (InText must not be null.). Wrap the call in an Exception Handler if InText can come from an untrusted or optional source.
GZip_BinaryExpand

Decompresses a gzip-compressed binary back into the original text. This is the current, correctly-named action — use this one for all new development.


ParameterDirectionOutSystems typeNotes
InBinaryInputBinary DataMust be a valid gzip payload (e.g. produced by GZip_StringCompress). Must not be null.
OutTextOutputTextDecompressed text.


Example

Input:

{ "InBinary": "H4sIAAAAAAAAC/NIzcnJVyjPL8pJ4QIAlyDA3RIAAAA=" }

Output:

{ "OutText": "Hello OutSystems!" }

Errors

  • If InBinary is null, the action throws with message InBinary must not be null..
  • If InBinary is not a valid gzip payload (corrupted, wrong format, or truncated), the action throws with message InBinary is not a valid gzip-compressed payload.. Always validate or wrap this call in an Exception Handler when the binary comes from an external source (upload, API response, etc.) rather than directly from GZip_StringCompress.
GZip_BinayExpand (deprecated — do not use in new logic)

Identical behavior to GZip_BinaryExpand (it delegates to it internally). Kept only so OutSystems apps built before this action was renamed keep working unchanged. New logic must call GZip_BinaryExpand instead — this action may be removed in a future major version.


ParameterDirectionOutSystems typeNotes
InBinaryInputBinary DataSame rules as GZip_BinaryExpand.
OutTextOutputTextSame as GZip_BinaryExpand.


Handling errors in OutSystems

All three actions can throw exceptions on invalid input (see per-action tables above). In OutSystems, wrap calls in an Exception Handler node and branch on the exception message, or validate inputs before calling (e.g. check InBinary is not empty/null before calling GZip_BinaryExpand) if you need a specific user-facing error instead of a generic failure.


Known limitations
  • Only the standard gzip format is supported (no configurable compression level, no other archive formats).
  • Text is always encoded/decoded as UTF-8.