Home / Function/ verifyCrc16() — netty Function Reference

verifyCrc16() — netty Function Reference

Architecture documentation for the verifyCrc16() function in JdkZlibDecoder.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  0005c058_d3b6_8d94_0a7b_5b5a71fa24c4["verifyCrc16()"]
  bba68af7_04c2_8ee6_82f0_73e08fa3f9cd["JdkZlibDecoder"]
  0005c058_d3b6_8d94_0a7b_5b5a71fa24c4 -->|defined in| bba68af7_04c2_8ee6_82f0_73e08fa3f9cd
  146f8d9e_03da_37c7_3683_c470a8d21243["readGZIPHeader()"]
  146f8d9e_03da_37c7_3683_c470a8d21243 -->|calls| 0005c058_d3b6_8d94_0a7b_5b5a71fa24c4
  style 0005c058_d3b6_8d94_0a7b_5b5a71fa24c4 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-compression/src/main/java/io/netty/handler/codec/compression/JdkZlibDecoder.java lines 506–520

    private boolean verifyCrc16(ByteBuf in) {
        if (in.readableBytes() < 2) {
            return false;
        }

        int crc16Value = in.readUnsignedShortLE();
        // the two least significant bytes from the CRC32
        int readCrc16 = (int) (crc.getValue() & 0xFFFF);

        if (crc16Value != readCrc16) {
            throw new DecompressionException(
                    "CRC16 value mismatch. Expected: " + crc16Value + ", Got: " + readCrc16);
        }
        return true;
    }

Domain

Subdomains

Called By

Frequently Asked Questions

What does verifyCrc16() do?
verifyCrc16() is a function in the netty codebase, defined in codec-compression/src/main/java/io/netty/handler/codec/compression/JdkZlibDecoder.java.
Where is verifyCrc16() defined?
verifyCrc16() is defined in codec-compression/src/main/java/io/netty/handler/codec/compression/JdkZlibDecoder.java at line 506.
What calls verifyCrc16()?
verifyCrc16() is called by 1 function(s): readGZIPHeader.

Analyze Your Own Codebase

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

Try Supermodel Free