> For the complete documentation index, see [llms.txt](https://adagio-io.gitbook.io/adagio-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://adagio-io.gitbook.io/adagio-documentation/openrtb-s2s-endpoint/review-your-technical-integration/gzip-compression-issues.md).

# GZIP Compression Issues

Your GZIP compression setup might not be optimal, but you’re not sure how to investigate the issue? Below are the most common causes of GZIP-related errors, along with the recommended actions to diagnose and resolve them.

| Cause                                                      | Description                                                                                                                                           | Recommended actions                                                                                                                                                                                                                   |
| ---------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| The payload is compressed twice                            | In this case, the request body is already GZIP-compressed and then compressed again.                                                                  | <ol><li>Validate the gzip structure of your payload</li><li>Try to decompress it, the result should be a JSON</li></ol><p>If decompression results in binary data instead of JSON, the payload is likely double-compressed.</p>       |
| The payload is not compressed, only the HTTP header is set | <p>Setting the <code>Content-Encoding: gzip</code> header is <strong>not sufficient</strong>.<br>The request body itself must be GZIP-compressed.</p> | <ol><li>Inspect the request body you are sending.</li><li>If the body is readable JSON, it is <strong>not</strong> compressed.</li><li>A properly GZIP-compressed payload should look like unreadable binary (“gibberish”).</li></ol> |
| The payload is truncated (`Content-Length` mismatch)       | If the payload is cut off during transmission, the `Content-Length` header will not match the actual payload size, causing decompression to fail.     | Compare the output with the `Content-Length` value set in the HTTP header. Both values must match exactly.                                                                                                                            |
| A different compression format is used                     | We only support **GZIP** compression. Other formats (such as raw zlib) are not compatible.                                                            | A valid GZIP payload should always starts with: `00000000 1f 8b 08` . If these bytes are missing, the payload is not GZIP-compressed.                                                                                                 |

If the issue persists after following the steps above, you can share an example of the **raw encoded payload** (i.e. the exact bid request body you are sending to us) with your **Solution Engineer** or at [**support@adagio.io**](mailto:support@adagio.io).

We can perform a quick review to help identify potential issues; however, please note that our analysis will be limited and does not replace full debugging on your side.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://adagio-io.gitbook.io/adagio-documentation/openrtb-s2s-endpoint/review-your-technical-integration/gzip-compression-issues.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
