This component allows you to compress and decompress data in binary using the GZIP algorithm. GZIP is a method of data compression that reduces the size of files and saves disk space. GZIP can also speed up data transfer over the network, as compressed files are lighter and faster to send and receive.
To use this component, you need to add a reference to it in your module. Then, you can drag the CompressBinary or DecompressBinary actions to your logic flow and configure the input and output parameters.
This action takes a binary as input and returns a compressed binary as
output as output. The DecompressBinary action does the opposite: it takes a compressed binary as input and returns an uncompressed binary as output. These actions are compatible with any type of binary file, such as images, documents, audios, videos, etc.
Here are some examples of how to use the CompressBinary and DecompressBinary actions in your logic flow.
To compress an image, you need to have a binary variable that contains the image data. You can use the BinaryData extension to load an image from a file or a URL. Then, you can use the CompressBinary action to compress the image and store the result in another binary variable. You can also use the BinaryLength function to check the size of the original and compressed image.
To decompress an image, you need to have a binary variable that contains the compressed image data. You can use the DecompressBinary action to decompress the image and store the result in another binary variable. You can also use the BinaryLength function to check the size of the compressed and decompressed image.
If you encounter any errors or problems when using this component, please check the following:
If you still need help, please contact the component support team.
Gzip encoded webservice use case.
If you want to configure a service that is encoded with the Gzip format and the OutSystems automation cannot automatically resolve the answer because it is encoded.Use the component's test page and there you can get the answer that you should put in the answer of the service configuration in Outsystems.
add a new action to call the service and handle the decode
If this component meets your needs, don't forget to rate it.
This component allows you to compress and decompress data using the GZip algorithm. You can use this component to reduce the size of your data and save storage space or bandwidth. This component offers two actions: GZipCompress and GZipDecompress.
This component has an Outsystems extension in C# / .net and uses using System.IO.Compression to perform the compression and decompression operations. This directive was introduced in .NET Framework 4.5 to provide classes that support the compression and decompression of files and streams using various algorithms, such as GZip. Before that, it was necessary to use third-party libraries or native code to perform these operations. This directive made it easier to work with compressed files and data in C# and other .NET languages.
To use this component, you need to have OutSystems 11 or higher and the BinaryData extension installed in your environment.
To install this component in your OutSystems Service Studio, follow these steps:
The component offers two actions to compress and decompress data using the GZip algorithm:
GZipCompress: This action receives a text or a binary as input and returns a compressed binary using the GZip algorithm. The action has two input parameters:
The action has one output parameter:
This action uses using System.IO.Compression.GZipStream to create a compressed stream from the input data.
For example, if you want to compress a text “Hello World” using this action, you can do something like this:
The result will be a compressed binary with 23 bytes.
GZipDecompress: This action receives a compressed binary as input and returns a decompressed text or binary using the GZip algorithm. The action has two input parameters:
This action uses using System.IO.Compression.GZipStream to create a decompressed stream from the input data.
For example, if you want to decompress a compressed binary with 23 bytes using this action, you can do something like this:
The result will be a decompressed text “Hello World” with 11 bytes.
The component has a test page that you can access by this link: https://ruihmendes.outsystemscloud.com/Gzip/. This page allows you to test the two actions of the component: GZipCompress and GZipDecompress.
The test page has the following elements:
To test your component using the test page, follow these steps:
If you have any questions, issues or suggestions about this component, you can contact me by email at ruihmendes@gmail.com or by leaving a feedback on the Forge page of the component: https://www.outsystems.com/forge/component-overview/8684/gzip-compress-decompress
Here are some sources that I used to create this component or that might be useful for users who want to know more about the topic: