Home / Function/ decodeLiteralWithNameRef() — netty Function Reference

decodeLiteralWithNameRef() — netty Function Reference

Architecture documentation for the decodeLiteralWithNameRef() function in QpackDecoder.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  2fd641da_fde9_9d66_eca9_4c340c9a6b26["decodeLiteralWithNameRef()"]
  90fa2d3f_8d04_4c74_e2ce_52229be77194["QpackDecoder"]
  2fd641da_fde9_9d66_eca9_4c340c9a6b26 -->|defined in| 90fa2d3f_8d04_4c74_e2ce_52229be77194
  678f973e_104e_7340_6c3b_b4ef23003fe0["decode()"]
  678f973e_104e_7340_6c3b_b4ef23003fe0 -->|calls| 2fd641da_fde9_9d66_eca9_4c340c9a6b26
  style 2fd641da_fde9_9d66_eca9_4c340c9a6b26 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-http3/src/main/java/io/netty/handler/codec/http3/QpackDecoder.java lines 329–357

    private void decodeLiteralWithNameRef(ByteBuf in, BiConsumer<CharSequence, CharSequence> sink, int base)
            throws QpackException {
        final CharSequence name;
        // https://www.rfc-editor.org/rfc/rfc9204.html#name-literal-field-line-with-nam
        //    0   1   2   3   4   5   6   7
        // +---+---+---+---+---+---+---+---+
        // | 0 | 1 | N | T |Name Index (4+)|
        // +---+---+---+---+---------------+
        // | H |     Value Length (7+)     |
        // +---+---------------------------+
        // |  Value String (Length bytes)  |
        // +-------------------------------+
        //
        // T == 1 implies static table
        if (firstByteEquals(in, (byte) 0b0001_0000)) {
            final int idx = decodePrefixedIntegerAsInt(in, 4);
            assert idx >= 0;
            if (idx >= QpackStaticTable.length) {
                throw NAME_ILLEGAL_INDEX_VALUE;
            }
            name = QpackStaticTable.getField(idx).name;
        } else {
            final int idx = decodePrefixedIntegerAsInt(in, 4);
            assert idx >= 0;
            name = dynamicTable.getEntryRelativeEncodedField(base - idx - 1).name;
        }
        final CharSequence value = decodeHuffmanEncodedLiteral(in, 7);
        sink.accept(name, value);
    }

Domain

Subdomains

Called By

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free