xtract.bot
POST /api/gzip-decompress

Decompress 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.

Decompresses a gzip-formatted stream and returns the original bytes. The trailer (CRC32 + uncompressed size) is verified, so a corrupted or truncated input fails with a clear error rather than silently returning a partial result. Pair this with `gzip-compress` for round-trip workflows.

Inputs

NameTypeDefaultDescription
data*fileGzip-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"'"
}'