Class DelegatingDecompressorFrameListener.Http2Decompressor

java.lang.Object
io.netty.handler.codec.http2.DelegatingDecompressorFrameListener.Http2Decompressor
Enclosing class:
DelegatingDecompressorFrameListener

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

    • decompressor

      private final EmbeddedChannel decompressor
    • compressed

      private int compressed
    • decompressed

      private int decompressed
    • stream

      private Http2Stream stream
    • padding

      private int padding
    • dataDecompressed

      private boolean dataDecompressed
    • targetCtx

      private ChannelHandlerContext targetCtx
  • Constructor Details

  • Method Details

    • cleanup

      void cleanup()
      Release remaining content from the EmbeddedChannel.
    • decompress

      int decompress(ChannelHandlerContext ctx, Http2Stream stream, ByteBuf data, int padding, boolean endOfStream) throws Http2Exception
      Throws:
      Http2Exception
    • incrementCompressedBytes

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

      private 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