Class DelegatingDecompressorFrameListener.Http2Decompressor

  • Enclosing class:
    DelegatingDecompressorFrameListener

    private static final class DelegatingDecompressorFrameListener.Http2Decompressor
    extends java.lang.Object
    Provides the state for stream DATA frame decompression.
    • Field Detail

      • compressed

        private int compressed
      • decompressed

        private int decompressed
    • Constructor Detail

    • Method Detail

      • decompressor

        EmbeddedChannel decompressor()
        Responsible for taking compressed bytes in and producing decompressed bytes.
      • incrementCompressedBytes

        void incrementCompressedBytes​(int delta)
        Increment the number of bytes received prior to doing any decompression.
      • incrementDecompressedBytes

        void incrementDecompressedBytes​(int delta)
        Increment the number of bytes after the decompression process.
      • consumeBytes

        int consumeBytes​(int streamId,
                         int decompressedBytes)
                  throws Http2Exception
        Determines the ratio between numBytes and decompressed. This ratio is used to decrement decompressed and compressed.
        Parameters:
        streamId - the stream ID
        decompressedBytes - The number of post-decompressed bytes to return to flow control
        Returns:
        The number of pre-decompressed bytes that have been consumed.
        Throws:
        Http2Exception