Home / Function/ testDecompressionSkip() — netty Function Reference

testDecompressionSkip() — netty Function Reference

Architecture documentation for the testDecompressionSkip() function in PerFrameDeflateDecoderTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  4699c6e2_efe4_2506_319a_62e80361c0c1["testDecompressionSkip()"]
  758acdb4_a05e_36ff_8910_74b681e91da1["PerFrameDeflateDecoderTest"]
  4699c6e2_efe4_2506_319a_62e80361c0c1 -->|defined in| 758acdb4_a05e_36ff_8910_74b681e91da1
  style 4699c6e2_efe4_2506_319a_62e80361c0c1 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-http/src/test/java/io/netty/handler/codec/http/websocketx/extensions/compression/PerFrameDeflateDecoderTest.java lines 125–153

    @Test
    public void testDecompressionSkip() {
        EmbeddedChannel encoderChannel = new EmbeddedChannel(
                ZlibCodecFactory.newZlibEncoder(ZlibWrapper.NONE, 9, 15, 8));
        EmbeddedChannel decoderChannel = new EmbeddedChannel(new PerFrameDeflateDecoder(false, ALWAYS_SKIP, 0));

        byte[] payload = new byte[300];
        random.nextBytes(payload);

        assertTrue(encoderChannel.writeOutbound(Unpooled.wrappedBuffer(payload)));
        ByteBuf compressedPayload = encoderChannel.readOutbound();

        BinaryWebSocketFrame compressedBinaryFrame = new BinaryWebSocketFrame(
                true, WebSocketExtension.RSV1 | WebSocketExtension.RSV3, compressedPayload);

        assertTrue(decoderChannel.writeInbound(compressedBinaryFrame));

        BinaryWebSocketFrame inboundBinaryFrame = decoderChannel.readInbound();

        assertNotNull(inboundBinaryFrame);
        assertNotNull(inboundBinaryFrame.content());
        assertEquals(compressedPayload, inboundBinaryFrame.content());
        assertEquals(5, inboundBinaryFrame.rsv());

        assertTrue(inboundBinaryFrame.release());

        assertTrue(encoderChannel.finishAndReleaseAll());
        assertFalse(decoderChannel.finish());
    }

Domain

Subdomains

Frequently Asked Questions

What does testDecompressionSkip() do?
testDecompressionSkip() is a function in the netty codebase, defined in codec-http/src/test/java/io/netty/handler/codec/http/websocketx/extensions/compression/PerFrameDeflateDecoderTest.java.
Where is testDecompressionSkip() defined?
testDecompressionSkip() is defined in codec-http/src/test/java/io/netty/handler/codec/http/websocketx/extensions/compression/PerFrameDeflateDecoderTest.java at line 125.

Analyze Your Own Codebase

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

Try Supermodel Free