QGrpcChannelOptions: allow narrowing accepted compression algorithms


QtGrpc unconditionally advertised `identity,deflate,gzip` in the
grpc-accept-encoding header on every RPC, with no way to opt out or to
query which algorithms the current build supports.

Introduce QtGrpc::CompressionAlgorithm and three accessors on
QGrpcChannelOptions: acceptedCompressionAlgorithms(),
setAcceptedCompressionAlgorithms(), and the static
supportedCompressionAlgorithms(). The default advertises every algorithm
the build can decompress, an empty set refuses all server compression.

Uncompressed messages (identity) are always accepted per the gRPC spec.
A server response using an encoding outside the accepted set now
finishes the call with StatusCode::Unimplemented.

[ChangeLog][QtGrpc][QGrpcChannelOptions] Added
setAcceptedCompressionAlgorithms() and supportedCompressionAlgorithms()
to control accepted server compression. Pass an empty set to refuse it.

Fixes: QTBUG-146709
Change-Id: I32808ee435c75077ec957cdfd4f4be8c59318908
Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
commitde604ccd6ddac64eab0318f3f8628df6f610e001
parentf764351a91e8d39172f483cc9173999c12778131
authorDennis Oberst <dennis.oberst@qt.io>
committerDennis Oberst <dennis.oberst@qt.io>
commit timeMon, 1 Jun 2026 14:55:45 +0000