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

Class Gzip

api/src/main/java/io/grpc/Codec.java:35–50  ·  view source on GitHub ↗

A gzip compressor and decompressor. In the future this will likely support other compression methods, such as compression level.

Source from the content-addressed store, hash-verified

33 * compression methods, such as compression level.
34 */
35 final class Gzip implements Codec {
36 @Override
37 public String getMessageEncoding() {
38 return "gzip";
39 }
40
41 @Override
42 public OutputStream compress(OutputStream os) throws IOException {
43 return new GZIPOutputStream(os);
44 }
45
46 @Override
47 public InputStream decompress(InputStream is) throws IOException {
48 return new GZIPInputStream(is);
49 }
50 }
51
52 /**
53 * The "identity", or "none" codec. This codec is special in that it can be used to explicitly

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected