Class SnappyCodec

java.lang.Object
io.deephaven.grpc.compression.SnappyCodec
All Implemented Interfaces:
io.grpc.Codec, io.grpc.Compressor, io.grpc.Decompressor

public final class SnappyCodec extends Object implements io.grpc.Codec
A gRPC Codec for the snappy message encoding, using the standard Snappy framing format (with CRC32C checksums) from snappy-java.
  • Field Details

    • ENCODING

      public static final String ENCODING
      The gRPC message encoding name, as it appears in grpc-encoding and grpc-accept-encoding.
      See Also:
    • INSTANCE

      public static final SnappyCodec INSTANCE
  • Method Details

    • getMessageEncoding

      public String getMessageEncoding()
      Specified by:
      getMessageEncoding in interface io.grpc.Compressor
      Specified by:
      getMessageEncoding in interface io.grpc.Decompressor
    • compress

      public OutputStream compress(OutputStream os) throws IOException
      Specified by:
      compress in interface io.grpc.Compressor
      Throws:
      IOException
    • decompress

      public InputStream decompress(InputStream is) throws IOException
      Specified by:
      decompress in interface io.grpc.Decompressor
      Throws:
      IOException