Package io.grpc
Interface Decompressor
-
- All Known Subinterfaces:
Codec
- All Known Implementing Classes:
Codec.Gzip
,Codec.Identity
@ExperimentalApi("https://github.com/grpc/grpc-java/issues/1704") public interface Decompressor
Represents a message decompressor.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description InputStream
decompress(InputStream is)
Wraps an existing input stream with a decompressing input stream.String
getMessageEncoding()
Returns the message encoding that this compressor uses.
-
-
-
Method Detail
-
getMessageEncoding
String getMessageEncoding()
Returns the message encoding that this compressor uses.This can be values such as "gzip", "deflate", "snappy", etc.
-
decompress
InputStream decompress(InputStream is) throws IOException
Wraps an existing input stream with a decompressing input stream.- Parameters:
is
- The input stream of uncompressed data- Returns:
- An input stream that decompresses
- Throws:
IOException
-
-