Decompress
Restore a compressed string back to its original text format.
The Decompress block is the reverse of the Compress block. It takes a compressed Base64-encoded string and restores it to its original, human-readable form.
Core Concept
If compression is like vacuum-packing a bag for travel, decompression is like opening that bag once you arrive at your destination. The data remains exactly the same, but it returns to its full size so it can be read or processed by other blocks in your workflow.
You must use the same algorithm for decompression that was used to compress the data originally. For example, if data was compressed using Gzip, you cannot decompress it using Brotli.
Configuration
| Field | Required | Description |
|---|---|---|
| Compressed Input | ✅ | The compressed string you want to restore. Typically a variable like {compressed_data}. |
| Compression Type | ✅ | The algorithm originally used: lzstring, gzip, deflate, or brotli. |
| Output Variable | ✅ | The name of the variable where the restored, original string will be stored. |
Error Handling
DECOMPRESS_INPUT_MISSING— Triggered when no input data is provided.DECOMPRESS_TYPE_MISSING— Triggered when no decompression algorithm is selected.DECOMPRESS_VAR_MISSING— Triggered when the output variable name is not defined.DECOMPRESS_TYPE_UNSUPPORTED— Triggered if an invalid algorithm is selected.DECOMPRESS_INVALID_DATA— Triggered if the input isn't valid compressed data for the selected algorithm.DECOMPRESS_UNEXPECTED_EOF— Triggered if the compressed data is incomplete or corrupted.DECOMPRESS_RUNTIME_ERROR— Triggered if decompression fails for other unexpected reasons.
Example: Reading Compressed Storage
Suppose you have retrieved a compressed user profile from a database to save storage space. You need to decompress it before you can check the user's settings.
- Compressed Input: Provide the variable from your database block, e.g.,
{db_result.profile_blob}. - Compression Type: Select
LZ-String(if that's what was used for storage). - Output Variable: Set it to
user_profile_json.
Now, {user_profile_json} will contain the original JSON text, which you can then parse or use in subsequent blocks.
