Interface Compressor


  • public interface Compressor
    Represents a message compressor.

    Copied from https://github.com/grpc/grpc-java/blob/80c3c992a66aa21ccf3e12e38000316e45f97e64/api/src/main/java/io/grpc/Compressor.java.

    • Method Detail

      • getMessageEncoding

        String getMessageEncoding()
        Returns the message encoding that this compressor uses.

        This can be values such as "gzip", "deflate", "snappy", etc.

      • compress

        OutputStream compress​(OutputStream os)
                       throws IOException
        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