Home / Function/ testGzipFooterCrcMismatchThrows() — netty Function Reference

testGzipFooterCrcMismatchThrows() — netty Function Reference

Architecture documentation for the testGzipFooterCrcMismatchThrows() function in JdkZlibTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  c7710a10_d777_77cd_6cae_b6dfa80d273d["testGzipFooterCrcMismatchThrows()"]
  4c83b538_e9fd_3b12_c32e_629bfd12e1ce["JdkZlibTest"]
  c7710a10_d777_77cd_6cae_b6dfa80d273d -->|defined in| 4c83b538_e9fd_3b12_c32e_629bfd12e1ce
  style c7710a10_d777_77cd_6cae_b6dfa80d273d fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-compression/src/test/java/io/netty/handler/codec/compression/JdkZlibTest.java lines 212–229

    @Test
    public void testGzipFooterCrcMismatchThrows() throws Exception {
        byte[] data = "corrupted gzip".getBytes(CharsetUtil.UTF_8);
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        GZIPOutputStream gzipOut = new GZIPOutputStream(baos);
        gzipOut.write(data);
        gzipOut.close();

        byte[] compressed = baos.toByteArray();
        // Corrupt the CRC
        compressed[compressed.length - 8] ^= 0xFF;

        EmbeddedChannel ch = new EmbeddedChannel(new JdkZlibDecoder(ZlibWrapper.GZIP, Integer.MAX_VALUE));
        assertThrows(DecompressionException.class, () -> {
            ch.writeInbound(Unpooled.wrappedBuffer(compressed));
        });
        ch.finishAndReleaseAll();
    }

Domain

Subdomains

Frequently Asked Questions

What does testGzipFooterCrcMismatchThrows() do?
testGzipFooterCrcMismatchThrows() is a function in the netty codebase, defined in codec-compression/src/test/java/io/netty/handler/codec/compression/JdkZlibTest.java.
Where is testGzipFooterCrcMismatchThrows() defined?
testGzipFooterCrcMismatchThrows() is defined in codec-compression/src/test/java/io/netty/handler/codec/compression/JdkZlibTest.java at line 212.

Analyze Your Own Codebase

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

Try Supermodel Free