xtract.bot
POST /api/zstd-decompress

Decompress a Zstandard (.zst) frame back to its original bytes. Validates the frame magic before decoding so non-zstd inputs fail with a clear error.

Decompresses a Zstandard frame and returns the original bytes. The frame magic is validated up-front so non-zstd inputs fail with a clear error instead of garbled output. Pair this with `zstd-compress` for round-trip workflows.

Inputs

NameTypeDefaultDescription
data*fileZstandard-compressed bytes (.zst frame).

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/zstd-decompress/lorem.txt.zst
DATA=$(base64 -w0 < lorem.txt.zst)

curl -X POST https://api.xtract.bot/api/zstd-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"'"
}'