Home / Function/ Http2Decompressor() — netty Function Reference

Http2Decompressor() — netty Function Reference

Architecture documentation for the Http2Decompressor() function in DelegatingDecompressorFrameListener.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  3b616ed8_35a3_6678_4e2d_df48df41f0f6["Http2Decompressor()"]
  5daed817_25b8_7048_df6a_dfebd688213d["Http2Decompressor"]
  3b616ed8_35a3_6678_4e2d_df48df41f0f6 -->|defined in| 5daed817_25b8_7048_df6a_dfebd688213d
  5d3e10a1_2485_47e9_aff0_57e2acb6d249["Http2Decompressor()"]
  3b616ed8_35a3_6678_4e2d_df48df41f0f6 -->|calls| 5d3e10a1_2485_47e9_aff0_57e2acb6d249
  9ea1931e_5f39_7536_e536_f68714591f6c["incrementDecompressedBytes()"]
  3b616ed8_35a3_6678_4e2d_df48df41f0f6 -->|calls| 9ea1931e_5f39_7536_e536_f68714591f6c
  57403601_677c_34ae_4ad2_1ca3c636837c["onDataRead()"]
  3b616ed8_35a3_6678_4e2d_df48df41f0f6 -->|calls| 57403601_677c_34ae_4ad2_1ca3c636837c
  aa3cf3aa_c581_458c_7bfd_76d9c933e628["consumeBytes()"]
  3b616ed8_35a3_6678_4e2d_df48df41f0f6 -->|calls| aa3cf3aa_c581_458c_7bfd_76d9c933e628
  style 3b616ed8_35a3_6678_4e2d_df48df41f0f6 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-http2/src/main/java/io/netty/handler/codec/http2/DelegatingDecompressorFrameListener.java lines 375–402

        Http2Decompressor(EmbeddedChannel decompressor,  Http2Connection connection, Http2FrameListener listener) {
            this.decompressor = decompressor;
            this.decompressor.pipeline().addLast(new ChannelInboundHandlerAdapter() {
                @Override
                public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {
                    ByteBuf buf = (ByteBuf) msg;
                    if (!buf.isReadable()) {
                        buf.release();
                        return;
                    }
                    incrementDecompressedBytes(buf.readableBytes());
                    // Immediately return the bytes back to the flow controller. ConsumedBytesConverter will convert
                    // from the decompressed amount which the user knows about to the compressed amount which flow
                    // control knows about.
                    connection.local().flowController().consumeBytes(stream,
                            listener.onDataRead(targetCtx, stream.id(), buf, padding, false));
                    padding = 0; // Padding is only communicated once on the first iteration.
                    buf.release();

                    dataDecompressed = true;
                }

                @Override
                public void channelInactive(ChannelHandlerContext ctx) throws Exception {
                    listener.onDataRead(targetCtx, stream.id(), Unpooled.EMPTY_BUFFER, padding, true);
                }
            });
        }

Domain

Subdomains

Frequently Asked Questions

What does Http2Decompressor() do?
Http2Decompressor() is a function in the netty codebase, defined in codec-http2/src/main/java/io/netty/handler/codec/http2/DelegatingDecompressorFrameListener.java.
Where is Http2Decompressor() defined?
Http2Decompressor() is defined in codec-http2/src/main/java/io/netty/handler/codec/http2/DelegatingDecompressorFrameListener.java at line 375.
What does Http2Decompressor() call?
Http2Decompressor() calls 4 function(s): Http2Decompressor, consumeBytes, incrementDecompressedBytes, onDataRead.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free