Home / Function/ testCompressionOfBatchedFlow() — netty Function Reference

testCompressionOfBatchedFlow() — netty Function Reference

Architecture documentation for the testCompressionOfBatchedFlow() function in AbstractEncoderTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  b47ae7a3_bfe9_36dc_13d2_e58e4d0e8480["testCompressionOfBatchedFlow()"]
  e75c2d44_55ff_20fb_58c6_157d886d9d30["AbstractEncoderTest"]
  b47ae7a3_bfe9_36dc_13d2_e58e4d0e8480 -->|defined in| e75c2d44_55ff_20fb_58c6_157d886d9d30
  4e64f197_018d_207d_28ce_06292148f160["testCompressionOfBatchedFlowOfData()"]
  4e64f197_018d_207d_28ce_06292148f160 -->|calls| b47ae7a3_bfe9_36dc_13d2_e58e4d0e8480
  style b47ae7a3_bfe9_36dc_13d2_e58e4d0e8480 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-compression/src/test/java/io/netty/handler/codec/compression/AbstractEncoderTest.java lines 99–119

    protected void testCompressionOfBatchedFlow(final ByteBuf data) throws Exception {
        final int dataLength = data.readableBytes();
        int written = 0, length = rand.nextInt(100);
        while (written + length < dataLength) {
            ByteBuf in = data.retainedSlice(written, length);
            assertTrue(channel.writeOutbound(in));
            assertEquals(0, in.readableBytes());
            written += length;
            length = rand.nextInt(100);
        }
        ByteBuf in = data.retainedSlice(written, dataLength - written);
        assertTrue(channel.writeOutbound(in));
        assertTrue(channel.finish());
        assertEquals(0, in.readableBytes());

        ByteBuf decompressed = readDecompressed(dataLength);
        assertEquals(data, decompressed);

        decompressed.release();
        data.release();
    }

Domain

Subdomains

Frequently Asked Questions

What does testCompressionOfBatchedFlow() do?
testCompressionOfBatchedFlow() is a function in the netty codebase, defined in codec-compression/src/test/java/io/netty/handler/codec/compression/AbstractEncoderTest.java.
Where is testCompressionOfBatchedFlow() defined?
testCompressionOfBatchedFlow() is defined in codec-compression/src/test/java/io/netty/handler/codec/compression/AbstractEncoderTest.java at line 99.
What calls testCompressionOfBatchedFlow()?
testCompressionOfBatchedFlow() is called by 1 function(s): testCompressionOfBatchedFlowOfData.

Analyze Your Own Codebase

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

Try Supermodel Free