nhttp_qpack_static_table (nhttp_lib v1.1.1)
View SourceQPACK static table for HTTP/3 (RFC 9204 Appendix A).
This module provides the 99-entry static table used by QPACK header compression. Forward lookup by index and reverse lookup by name, or by name and value, are constant time.
Summary
Functions
Find the smallest index matching the given header name.
Find an index matching the given header name and value.
Returns {ok, Index} for an exact name+value match,
{name, Index} if only the name matches (smallest index),
or error if the name is not found at all.
Look up a static table entry by index.
Returns {ok, {Name, Value}} for valid indices 0-98,
or {error, bad_index} for anything else.
Return the number of entries in the static table.
Types
Functions
Find the smallest index matching the given header name.
Returns {ok, Index} if the name exists in the static table,
or error if it does not. When multiple entries share the same
name, the smallest index is returned.
Find an index matching the given header name and value.
Returns {ok, Index} for an exact name+value match,
{name, Index} if only the name matches (smallest index),
or error if the name is not found at all.
-spec lookup(non_neg_integer()) -> {ok, static_entry()} | {error, bad_index}.
Look up a static table entry by index.
Returns {ok, {Name, Value}} for valid indices 0-98,
or {error, bad_index} for anything else.
-spec size() -> 99.
Return the number of entries in the static table.