# `Tinkex.API.Compression`
[🔗](https://github.com/North-Shore-AI/tinkex/blob/v0.4.0/lib/tinkex/api/compression.ex#L1)

Response compression handling for Tinkex API.

Handles gzip decompression and content-encoding header management.

# `decompress`

```elixir
@spec decompress(Finch.Response.t()) :: Finch.Response.t()
```

Decompresses a Finch response if it's gzip-encoded.

Checks the content-encoding header and decompresses the body if it's gzip.
Strips the content-encoding header after decompression.

## Examples

    iex> response = %Finch.Response{
    ...>   body: :zlib.gzip("test"),
    ...>   headers: [{"content-encoding", "gzip"}]
    ...> }
    iex> decompressed = decompress(response)
    iex> decompressed.body
    "test"

---

*Consult [api-reference.md](api-reference.md) for complete listing*
