public interface GrpcMessageCompressor
A gRPC message compressor is used to compress or uncompress gRPC messages.
- Since:
- 1.9
- Author:
- Jeremy Kuhn
-
Method Summary
Modifier and TypeMethodDescriptionCompresses the specified data.Returns the message encoding identifying the compressor.uncompress
(ByteBuf data) Uncompresses the specified data.
-
Method Details
-
getMessageEncoding
String getMessageEncoding()Returns the message encoding identifying the compressor.
The message encoding is specified in gRPC request and response and indicates how message must be compressed or uncompressed to a client or a server.
- Returns:
- a message encoding
-
compress
Compresses the specified data.
- Parameters:
data
- the data to compress- Returns:
- compressed data
- Throws:
GrpcException
- if ther was an error compressing data
-
uncompress
Uncompresses the specified data.
- Parameters:
data
- the data to uncompress- Returns:
- uncompressed data
- Throws:
GrpcException
- if ther was an error uncompressing data
-