Home / Function/ decodePrefixedInteger() — netty Function Reference

decodePrefixedInteger() — netty Function Reference

Architecture documentation for the decodePrefixedInteger() function in QpackUtil.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  7eae73ee_1f1f_149c_78a1_09413dd2bb87["decodePrefixedInteger()"]
  be173d53_8b5e_e8c7_536e_bb5840ee634a["QpackUtil"]
  7eae73ee_1f1f_149c_78a1_09413dd2bb87 -->|defined in| be173d53_8b5e_e8c7_536e_bb5840ee634a
  d5455c89_7832_04d6_d655_ef21269b54e3["decodePrefixedIntegerAsInt()"]
  d5455c89_7832_04d6_d655_ef21269b54e3 -->|calls| 7eae73ee_1f1f_149c_78a1_09413dd2bb87
  style 7eae73ee_1f1f_149c_78a1_09413dd2bb87 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-http3/src/main/java/io/netty/handler/codec/http3/QpackUtil.java lines 86–114

    static long decodePrefixedInteger(ByteBuf in, int prefixLength) {
        int readerIndex = in.readerIndex();
        int writerIndex = in.writerIndex();
        if (readerIndex == writerIndex) {
            return -1;
        }

        int nbits = (1 << prefixLength) - 1;
        int first = in.readByte() & nbits;
        if (first < nbits) {
            return first;
        }

        int idx = readerIndex + 1;
        long i = first;
        int factor = 0;
        byte next;
        do {
            if (idx == writerIndex) {
                in.readerIndex(readerIndex);
                return -1;
            }
            next = in.getByte(idx++);
            i += (next & 0x7fL) << factor;
            factor += 7;
        } while ((next & 0x80) == 0x80);
        in.readerIndex(idx);
        return i;
    }

Domain

Subdomains

Frequently Asked Questions

What does decodePrefixedInteger() do?
decodePrefixedInteger() is a function in the netty codebase, defined in codec-http3/src/main/java/io/netty/handler/codec/http3/QpackUtil.java.
Where is decodePrefixedInteger() defined?
decodePrefixedInteger() is defined in codec-http3/src/main/java/io/netty/handler/codec/http3/QpackUtil.java at line 86.
What calls decodePrefixedInteger()?
decodePrefixedInteger() is called by 1 function(s): decodePrefixedIntegerAsInt.

Analyze Your Own Codebase

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

Try Supermodel Free