feat(codec): compression support (#692)
* Initial compression support * Support configuring compression on `Server` * Minor clean up * Test that compression is actually happening * Clean up some todos * channels compressing requests * Move compression to be on the codecs * Test sending compressed request to server that doesn't support it * Clean up a bit * Compress server streams * Compress client streams * Bidirectional streaming compression * Handle receiving unsupported encoding * Clean up * Add note to future self * Support disabling compression for individual responses * Add docs * Add compression examples * Disable compression behind feature flag * Add some docs * Make flate2 optional dependency * Fix docs wording * Format * Reply with which encodings are supported * Convert tests to use mocked io * Fix lints * Use separate counters * Don't make a long stream * Address review feedback
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package test;
|
||||
|
||||
import "google/protobuf/empty.proto";
|
||||
|
||||
service Test {
|
||||
rpc CompressOutputUnary(google.protobuf.Empty) returns (SomeData);
|
||||
rpc CompressInputUnary(SomeData) returns (google.protobuf.Empty);
|
||||
rpc CompressOutputServerStream(google.protobuf.Empty) returns (stream SomeData);
|
||||
rpc CompressInputClientStream(stream SomeData) returns (google.protobuf.Empty);
|
||||
rpc CompressOutputClientStream(stream SomeData) returns (SomeData);
|
||||
rpc CompressInputOutputBidirectionalStream(stream SomeData) returns (stream SomeData);
|
||||
}
|
||||
|
||||
message SomeData {
|
||||
// include a bunch of data so there actually is something to compress
|
||||
bytes data = 1;
|
||||
}
|
||||
Reference in New Issue
Block a user