Home / Function/ testGZIP2() — netty Function Reference

testGZIP2() — netty Function Reference

Architecture documentation for the testGZIP2() function in ZlibTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  68c038d9_43a9_a728_66e1_b0f0176653a5["testGZIP2()"]
  7036d690_c470_1931_3ca2_5fffb656bebb["ZlibTest"]
  68c038d9_43a9_a728_66e1_b0f0176653a5 -->|defined in| 7036d690_c470_1931_3ca2_5fffb656bebb
  b2297b88_b9fe_3e69_e323_1d6cee4f7b1f["gzip()"]
  68c038d9_43a9_a728_66e1_b0f0176653a5 -->|calls| b2297b88_b9fe_3e69_e323_1d6cee4f7b1f
  4ce8bff0_577d_fb67_462a_3c492abedec9["dispose()"]
  68c038d9_43a9_a728_66e1_b0f0176653a5 -->|calls| 4ce8bff0_577d_fb67_462a_3c492abedec9
  style 68c038d9_43a9_a728_66e1_b0f0176653a5 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-compression/src/test/java/io/netty/handler/codec/compression/ZlibTest.java lines 105–134

    @Test
    public void testGZIP2() throws Exception {
        byte[] bytes = "message".getBytes(CharsetUtil.UTF_8);
        ByteBuf data = Unpooled.wrappedBuffer(bytes);
        ByteBuf deflatedData = Unpooled.wrappedBuffer(gzip(bytes));

        EmbeddedChannel chDecoderGZip = new EmbeddedChannel(createDecoder(ZlibWrapper.GZIP));
        try {
            while (deflatedData.isReadable()) {
                chDecoderGZip.writeInbound(deflatedData.readRetainedSlice(1));
            }
            deflatedData.release();
            assertTrue(chDecoderGZip.finish());
            ByteBuf buf = Unpooled.buffer();
            for (;;) {
                ByteBuf b = chDecoderGZip.readInbound();
                if (b == null) {
                    break;
                }
                buf.writeBytes(b);
                b.release();
            }
            assertEquals(buf, data);
            assertNull(chDecoderGZip.readInbound());
            data.release();
            buf.release();
        } finally {
            dispose(chDecoderGZip);
        }
    }

Domain

Subdomains

Frequently Asked Questions

What does testGZIP2() do?
testGZIP2() is a function in the netty codebase, defined in codec-compression/src/test/java/io/netty/handler/codec/compression/ZlibTest.java.
Where is testGZIP2() defined?
testGZIP2() is defined in codec-compression/src/test/java/io/netty/handler/codec/compression/ZlibTest.java at line 105.
What does testGZIP2() call?
testGZIP2() calls 2 function(s): dispose, gzip.

Analyze Your Own Codebase

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

Try Supermodel Free