Gzip decompress
Try it interactively →POST /api/gzip-decompressDecompress a gzip (.gz) stream back to its original bytes. Validates the trailer so corrupted or truncated inputs fail loudly instead of silently producing partial output.
Inputs
| Name | Type | Default | Description |
|---|---|---|---|
| data* | file | — | Gzip-compressed bytes (RFC 1952). |
Response
Modes: binary, json. Cache: yes (24h TTL).
Code samples
Built from the lorem example.
# Download or substitute the example input:
# curl -O https://xtract.bot/examples/gzip-decompress/lorem.txt.gz
DATA=$(base64 -w0 < lorem.txt.gz)
curl -X POST https://api.xtract.bot/api/gzip-decompress \
-H "Content-Type: application/json" \
-H "Accept: application/octet-stream" \
-H "X-Account-Id: $XTRACT_ACCOUNT_ID" \
-H "X-Api-Key: $XTRACT_API_KEY" \
-d '{
"data": "'"$DATA"'"
}'