MCPcopy Create free account
hub / github.com/grpc/grpc-java / withCompression

Method withCompression

api/src/main/java/io/grpc/CallOptions.java:153–157  ·  view source on GitHub ↗

Sets the compression to use for the call. The compressor must be a valid name known in the CompressorRegistry. By default, the "gzip" compressor will be available. It is only safe to call this if the server supports the compression format chosen. There is no negotiation performed; if t

(@Nullable String compressorName)

Source from the content-addressed store, hash-verified

151 * fail.
152 */
153 public CallOptions withCompression(@Nullable String compressorName) {
154 Builder builder = toBuilder(this);
155 builder.compressorName = compressorName;
156 return builder.build();
157 }
158
159 /**
160 * Returns a new {@code CallOptions} with the given absolute deadline.

Callers 5

CallOptionsTestClass · 0.45
interceptCallMethod · 0.45
clientCompressedUnaryMethod · 0.45
greetMethod · 0.45

Calls 2

toBuilderMethod · 0.95
buildMethod · 0.95

Tested by 3

interceptCallMethod · 0.36
clientCompressedUnaryMethod · 0.36