> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cloudx.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Bid Traffic Compression

> HTTP compression support for OpenRTB bid requests and responses

CloudX supports gzip and zstd compression for OpenRTB traffic exchanged with demand partners. Compression is enabled per bidder endpoint in coordination with CloudX.

## Bid requests

When compression is enabled, CloudX compresses the OpenRTB JSON request body and identifies the algorithm with the HTTP `Content-Encoding` header:

```http theme={null}
Content-Encoding: zstd
Content-Type: application/json
```

Bidder endpoints must decompress the body before parsing the OpenRTB request.

CloudX may also advertise the response encodings it accepts:

```http theme={null}
Accept-Encoding: gzip, zstd
```

## Bid responses

When `Accept-Encoding` includes `gzip` or `zstd`, the bidder may compress the OpenRTB response with either advertised encoding. Set `Content-Encoding` to the algorithm used:

```http theme={null}
Content-Encoding: zstd
Content-Type: application/json
```

Do not send a compressed body without the matching `Content-Encoding` header.

## Failure handling and rollback

A response with an unsupported encoding, a compressed body with a missing or mismatched `Content-Encoding` header, or a body that cannot be decompressed is invalid and excluded from the auction. CloudX does not automatically retry the response without compression. Contact CloudX to revert the endpoint to gzip or uncompressed traffic.

## Enablement

Contact CloudX to coordinate enablement and validation for your bidder endpoint. gzip remains supported for existing integrations.
