Package io.grpc
Interface Compressor
- All Known Subinterfaces:
Codec
- All Known Implementing Classes:
Codec.Gzip
,Codec.Identity
Represents a message compressor.
-
Method Summary
Modifier and TypeMethodDescriptioncompress
(OutputStream os) Wraps an existing output stream with a compressing output stream.Returns the message encoding that this compressor uses.
-
Method Details
-
getMessageEncoding
String getMessageEncoding()Returns the message encoding that this compressor uses.This can be values such as "gzip", "deflate", "snappy", etc.
-
compress
Wraps an existing output stream with a compressing output stream.- Parameters:
os
- The output stream of uncompressed data- Returns:
- An output stream that compresses
- Throws:
IOException
-