Skip to content

Commit

Permalink
improve compress middleware documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
ReneWerner87 committed Oct 5, 2023
1 parent d00f0b8 commit 5171f6b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/api/middleware/compress.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ id: compress

Compression middleware for [Fiber](https://github.com/gofiber/fiber) that will compress the response using `gzip`, `deflate` and `brotli` compression depending on the [Accept-Encoding](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Encoding) header.

:::note
The compression middleware refrains from compressing bodies that are smaller than 200 bytes. This decision is based on the observation that, in such cases, the compressed size is likely to exceed the original size, making compression inefficient. [more](https://github.com/valyala/fasthttp/blob/497922a21ef4b314f393887e9c6147b8c3e3eda4/http.go#L1713-L1715)
:::

## Signatures

```go
Expand Down

0 comments on commit 5171f6b

Please sign in to comment.