pjfanning opened a new issue, #924: URL: https://github.com/apache/pekko-grpc/issues/924
`Codecs.supportedCodecs` is `Seq(Gzip, Identity)`. A client that compresses requests with `deflate` gets `UNIMPLEMENTED` from a Pekko gRPC server (`Codecs.detect`), and a server can't send deflate responses. `deflate` is one of the encodings in the gRPC compression spec (https://github.com/grpc/grpc/blob/master/doc/compression.md). gRPC C-core and the languages built on it (C++, Python, Ruby, PHP, Objective-C) support it. grpc-java and grpc-go ship with gzip only, so this is mainly for interop with C-core clients. Compared with gzip it saves only a few bytes of framing per message and uses a cheaper checksum (Adler-32 instead of CRC32). Proposal: - A `Deflate` codec beside `Gzip`, using `java.util.zip.Deflater`/`Inflater`, added to `Codecs.supportedCodecs`. - It must use the zlib format (RFC 1950, `nowrap = false`), not raw DEFLATE. - Decompression must respect `max-inbound-message-size` the way gzip does, so decompression bombs are still rejected. - Tests for round trips, for interop with a grpc-java client that has a deflate codec registered, and for the inbound size limit. - Update the docs. Related, to check first: `Codecs.negotiate` picks the first supported entry in the client's `grpc-accept-encoding`. If C-core clients send `identity,deflate,gzip`, a Pekko server picks `identity` and never compresses responses to them, with or without deflate support. If that's confirmed, the server should rank the codecs by its own preference (e.g. gzip, deflate, then identity) instead. Client-side request compression: #923 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
