testGZIP3() — netty Function Reference
Architecture documentation for the testGZIP3() function in ZlibTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD d8de06d4_568e_39e8_a7a7_d9ef11455094["testGZIP3()"] 7036d690_c470_1931_3ca2_5fffb656bebb["ZlibTest"] d8de06d4_568e_39e8_a7a7_d9ef11455094 -->|defined in| 7036d690_c470_1931_3ca2_5fffb656bebb 4ce8bff0_577d_fb67_462a_3c492abedec9["dispose()"] d8de06d4_568e_39e8_a7a7_d9ef11455094 -->|calls| 4ce8bff0_577d_fb67_462a_3c492abedec9 style d8de06d4_568e_39e8_a7a7_d9ef11455094 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
codec-compression/src/test/java/io/netty/handler/codec/compression/ZlibTest.java lines 136–178
@Test
public void testGZIP3() throws Exception {
byte[] bytes = "Foo".getBytes(CharsetUtil.UTF_8);
ByteBuf data = Unpooled.wrappedBuffer(bytes);
ByteBuf deflatedData = Unpooled.wrappedBuffer(
new byte[]{
31, -117, // magic number
8, // CM
2, // FLG.FHCRC
0, 0, 0, 0, // MTIME
0, // XFL
7, // OS
-66, -77, // CRC16
115, -53, -49, 7, 0, // compressed blocks
-63, 35, 62, -76, // CRC32
3, 0, 0, 0 // ISIZE
}
);
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
Calls
Source
Frequently Asked Questions
What does testGZIP3() do?
testGZIP3() is a function in the netty codebase, defined in codec-compression/src/test/java/io/netty/handler/codec/compression/ZlibTest.java.
Where is testGZIP3() defined?
testGZIP3() is defined in codec-compression/src/test/java/io/netty/handler/codec/compression/ZlibTest.java at line 136.
What does testGZIP3() call?
testGZIP3() calls 1 function(s): dispose.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free