> For the complete documentation index, see [llms.txt](https://docs.hypersolutions.co/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hypersolutions.co/compression.md).

# Compression

### Supported Algorithms

* **gzip** - Widely supported, good general-purpose compression
* **deflate** - Lightweight compression with broad compatibility
* **brotli** - Modern algorithm with excellent compression ratio
* **zstd** - Recommended for best overall performance

### Using Compression

#### Request Compression

Set the `Content-Encoding` header with your chosen algorithm:

```
Content-Encoding: zstd
```

#### Response Compression

Set the `Accept-Encoding` header in your request:

```
Accept-Encoding: zstd, br, gzip
```

### Recommendations

* **Best Performance**: zstd provides the optimal balance of compression ratio and speed
* **Highest Compatibility**: gzip is supported by virtually all HTTP clients

### SDK Support

* **Go SDK (v1.7.2+)**: Uses zstd compression by default
* **Python/JavaScript SDKs**: Use gzip compression by default

### Performance Comparison

| Algorithm | Speed  | Compression Ratio | Use Case                     |
| --------- | ------ | ----------------- | ---------------------------- |
| zstd      | Fast   | Very good         | Recommended for most cases   |
| brotli    | Slow   | Excellent         | When bandwidth is limited    |
| gzip      | Medium | Good              | When compatibility is needed |
| deflate   | Medium | Fair              | Lightweight option           |

For implementation help, contact our support team.


---

# 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:

```
GET https://docs.hypersolutions.co/compression.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
