Interface GrpcMessageCompressor


public interface GrpcMessageCompressor

A gRPC message compressor is used to compress or uncompress gRPC messages.

Since:
1.9
Author:
Jeremy Kuhn
  • 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

      ByteBuf compress(ByteBuf data) throws GrpcException

      Compresses the specified data.

      Parameters:
      data - the data to compress
      Returns:
      compressed data
      Throws:
      GrpcException - if ther was an error compressing data
    • uncompress

      ByteBuf uncompress(ByteBuf data) throws GrpcException

      Uncompresses the specified data.

      Parameters:
      data - the data to uncompress
      Returns:
      uncompressed data
      Throws:
      GrpcException - if ther was an error uncompressing data