Zip / Unzip - File Compression < 10MB
Compress and decompress files using ZIP or GZIP formats. Handles archives up to 10MB with up to 200 files. Output files are stored in cloud storage for 7 days by default.
Actions
compress
Create a ZIP or GZIP archive from input files.
ZIP Compression
Required fields:
action:"compress"format:"zip"files: Array of file objects, each with:filename(string) - Name/path for the file inside the archivecontent_base64(string) - Base64-encoded file content
Optional fields:
filename(string) - Name for the output ZIP file (default:"archive.zip")store_file(boolean) - Store output in cloud storage (default:true)include_contents(boolean) - Include base64 of the archive in the response (default:false)
Example:
{
"action": "compress",
"format": "zip",
"files": [
{"filename": "report.txt", "content_base64": "SGVsbG8gV29ybGQ="},
{"filename": "data/notes.csv", "content_base64": "bmFtZSxhZ2UKQWxpY2UsMzA="}
],
"filename": "my_reports.zip"
}
GZIP Compression
Compresses a single file using GZIP.
Required fields:
action:"compress"format:"gzip"input_base64(string) - Base64-encoded content of the file to compress
Optional fields:
filename(string) - Name for the output file (default:"archive.gz")store_file(boolean) - Store output in cloud storage (default:true)include_contents(boolean) - Include base64 of the compressed output in the response (default:false)
Example:
{
"action": "compress",
"format": "gzip",
"input_base64": "TGFyZ2UgdGV4dCBmaWxlIGNvbnRlbnQgaGVyZS4u",
"filename": "logfile.txt.gz"
}
decompress
Extract files from a ZIP or GZIP archive.
ZIP Decompression
Required fields:
action:"decompress"format:"zip"- One of:
input_base64(string) - Base64-encoded ZIP archivefile_id(string) - File ID of a previously stored ZIP archive
Optional fields:
store_file(boolean) - Store each extracted file in cloud storage (default:true)include_contents(boolean) - Include base64 content of each extracted file in the response (default:false)
Example using base64 input:
{
"action": "decompress",
"format": "zip",
"input_base64": "UEsDBBQAAAAI...",
"include_contents": true
}
Example using file_id:
{
"action": "decompress",
"format": "zip",
"file_id": "abc123def456"
}
GZIP Decompression
Required fields:
action:"decompress"format:"gzip"- One of:
input_base64(string) - Base64-encoded GZIP filefile_id(string) - File ID of a previously stored GZIP file
Optional fields:
filename(string) - Name for the decompressed output file (default:"decompressed")store_file(boolean) - Store the decompressed file in cloud storage (default:true)include_contents(boolean) - Include base64 of the decompressed content in the response (default:false)
Example:
{
"action": "decompress",
"format": "gzip",
"file_id": "abc123def456",
"filename": "restored_log.txt"
}
Common Workflows
Bundle multiple files for download
- Call
compresswithformat: "zip"and an array of files. - Use the returned
signed_urlto share or download the archive.
Extract and inspect an uploaded archive
- Call
decompresswith thefile_idof the uploaded archive. - Each extracted file gets its own
file_idandsigned_urlfor individual access.
Compress and retrieve inline
- Call
compresswithinclude_contents: trueandstore_file: falseto get the archive as base64 in the response without storing it.
Important Notes
- Size limit: Total input and output must each be under 10MB. For larger files, use the large archive tool.
- File count limit: ZIP archives support up to 200 files.
- Storage: Output files are stored in cloud storage for 7 days by default when
store_fileistrue. - ZIP format supports multiple files; GZIP format compresses a single file.
- The response includes
file_idandsigned_urlfor each stored file. - When decompressing a ZIP, the response includes a
filesarray with details for each extracted file.







