Home / Function/ encodeSlowPath() — netty Function Reference

encodeSlowPath() — netty Function Reference

Architecture documentation for the encodeSlowPath() function in HpackHuffmanEncoder.java from the netty codebase.

Function java Buffer Allocators calls 1 called by 1

Entity Profile

Dependency Diagram

graph TD
  a54721bd_7360_1db2_6a09_174e3c7cf119["encodeSlowPath()"]
  cae44e7d_aecf_908f_00c9_c17c6337e81a["HpackHuffmanEncoder"]
  a54721bd_7360_1db2_6a09_174e3c7cf119 -->|defined in| cae44e7d_aecf_908f_00c9_c17c6337e81a
  1d7e7b35_132b_b895_c2f2_b87999561c33["encode()"]
  1d7e7b35_132b_b895_c2f2_b87999561c33 -->|calls| a54721bd_7360_1db2_6a09_174e3c7cf119
  eab78b05_f384_4b18_4f7e_57e23e6491b8["length()"]
  a54721bd_7360_1db2_6a09_174e3c7cf119 -->|calls| eab78b05_f384_4b18_4f7e_57e23e6491b8
  style a54721bd_7360_1db2_6a09_174e3c7cf119 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-http2/src/main/java/io/netty/handler/codec/http2/HpackHuffmanEncoder.java lines 85–109

    private void encodeSlowPath(ByteBuf out, CharSequence data) {
        long current = 0;
        int n = 0;

        for (int i = 0; i < data.length(); i++) {
            int b = AsciiString.c2b(data.charAt(i)) & 0xFF;
            int code = codes[b];
            int nbits = lengths[b];

            current <<= nbits;
            current |= code;
            n += nbits;

            while (n >= 8) {
                n -= 8;
                out.writeByte((int) (current >> n));
            }
        }

        if (n > 0) {
            current <<= 8 - n;
            current |= 0xFF >>> n; // this should be EOS symbol
            out.writeByte((int) current);
        }
    }

Domain

Subdomains

Calls

Called By

Frequently Asked Questions

What does encodeSlowPath() do?
encodeSlowPath() is a function in the netty codebase, defined in codec-http2/src/main/java/io/netty/handler/codec/http2/HpackHuffmanEncoder.java.
Where is encodeSlowPath() defined?
encodeSlowPath() is defined in codec-http2/src/main/java/io/netty/handler/codec/http2/HpackHuffmanEncoder.java at line 85.
What does encodeSlowPath() call?
encodeSlowPath() calls 1 function(s): length.
What calls encodeSlowPath()?
encodeSlowPath() is called by 1 function(s): encode.

Analyze Your Own Codebase

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

Try Supermodel Free