Home / Function/ allocateNodeLengths() — netty Function Reference

allocateNodeLengths() — netty Function Reference

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

Function java Buffer Allocators calls 1 called by 1

Entity Profile

Dependency Diagram

graph TD
  a7f0d7e8_8c26_ba76_56bf_1426cfcf43d0["allocateNodeLengths()"]
  3ede8457_e9d7_5e55_8fd7_02b725a73605["Bzip2HuffmanAllocator"]
  a7f0d7e8_8c26_ba76_56bf_1426cfcf43d0 -->|defined in| 3ede8457_e9d7_5e55_8fd7_02b725a73605
  2de6ad84_ece2_e1f6_0d2d_5992144ef04b["allocateHuffmanCodeLengths()"]
  2de6ad84_ece2_e1f6_0d2d_5992144ef04b -->|calls| a7f0d7e8_8c26_ba76_56bf_1426cfcf43d0
  9ea0eddc_76b9_92b2_0ab9_81aa6582f3b6["first()"]
  a7f0d7e8_8c26_ba76_56bf_1426cfcf43d0 -->|calls| 9ea0eddc_76b9_92b2_0ab9_81aa6582f3b6
  style a7f0d7e8_8c26_ba76_56bf_1426cfcf43d0 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-compression/src/main/java/io/netty/handler/codec/compression/Bzip2HuffmanAllocator.java lines 100–114

    private static void allocateNodeLengths(final int[] array) {
        int firstNode = array.length - 2;
        int nextNode = array.length - 1;

        for (int currentDepth = 1, availableNodes = 2; availableNodes > 0; currentDepth++) {
            final int lastNode = firstNode;
            firstNode = first(array, lastNode - 1, 0);

            for (int i = availableNodes - (lastNode - firstNode); i > 0; i--) {
                array[nextNode--] = currentDepth;
            }

            availableNodes = (lastNode - firstNode) << 1;
        }
    }

Domain

Subdomains

Calls

Frequently Asked Questions

What does allocateNodeLengths() do?
allocateNodeLengths() is a function in the netty codebase, defined in codec-compression/src/main/java/io/netty/handler/codec/compression/Bzip2HuffmanAllocator.java.
Where is allocateNodeLengths() defined?
allocateNodeLengths() is defined in codec-compression/src/main/java/io/netty/handler/codec/compression/Bzip2HuffmanAllocator.java at line 100.
What does allocateNodeLengths() call?
allocateNodeLengths() calls 1 function(s): first.
What calls allocateNodeLengths()?
allocateNodeLengths() 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