Skip to content

trillium-compression-v0.3.1

Choose a tag to compare

@github-actions github-actions released this 02 Jun 22:42
· 36 commits to main since this release

Added

  • Client-side Compression handler behind the new client feature
    (trillium_compression::client::Compression). Implements ClientHandler
    bidirectionally:
    • Responses: advertises Accept-Encoding on outbound requests and
      transparently decodes brotli/gzip/zstd response bodies, stripping
      Content-Encoding so callers read plaintext.
    • Requests (opt-in): compresses the request body and sets Content-Encoding
      when a request encoding is selected — handler-wide via
      Compression::with_default_encoding, or per request by setting a
      CompressionAlgorithm on the conn's state (which overrides the default).
  • CompressionAlgorithm::Identity, the identity content-coding. As a per-conn
    client state signal it opts a single request out of a configured default
    request encoding.