Home / Function/ setExtendedParentPointers() — netty Function Reference

setExtendedParentPointers() — netty Function Reference

Architecture documentation for the setExtendedParentPointers() function in Bzip2HuffmanAllocator.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  21a7e6f4_2182_ef35_16b7_26d7774b9f85["setExtendedParentPointers()"]
  3ede8457_e9d7_5e55_8fd7_02b725a73605["Bzip2HuffmanAllocator"]
  21a7e6f4_2182_ef35_16b7_26d7774b9f85 -->|defined in| 3ede8457_e9d7_5e55_8fd7_02b725a73605
  2de6ad84_ece2_e1f6_0d2d_5992144ef04b["allocateHuffmanCodeLengths()"]
  2de6ad84_ece2_e1f6_0d2d_5992144ef04b -->|calls| 21a7e6f4_2182_ef35_16b7_26d7774b9f85
  style 21a7e6f4_2182_ef35_16b7_26d7774b9f85 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-compression/src/main/java/io/netty/handler/codec/compression/Bzip2HuffmanAllocator.java lines 59–80

    private static void setExtendedParentPointers(final int[] array) {
        final int length = array.length;
        array[0] += array[1];

        for (int headNode = 0, tailNode = 1, topNode = 2; tailNode < length - 1; tailNode++) {
            int temp;
            if (topNode >= length || array[headNode] < array[topNode]) {
                temp = array[headNode];
                array[headNode++] = tailNode;
            } else {
                temp = array[topNode++];
            }

            if (topNode >= length || (headNode < tailNode && array[headNode] < array[topNode])) {
                temp += array[headNode];
                array[headNode++] = tailNode + length;
            } else {
                temp += array[topNode++];
            }
            array[tailNode] = temp;
        }
    }

Domain

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free