QpackString class

QPACK string literal encoder/decoder per RFC 9204 Section 4.2 (same as RFC 7541 §6.2).

The first byte contains:

  • bit 7 (0x80): Huffman flag (1 = Huffman-coded, 0 = raw)
  • bits 6-0: length prefix (7 bits)

If the length fits in 7 bits it is encoded in the first byte; otherwise the prefix is all-ones and the remainder follows in multi-byte continuation. The string bytes (raw UTF-8; Huffman coding is reserved for future use) are appended after the length.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

decode(Uint8List bytes, int offset) → (String, int)
Decode a QPACK string literal from bytes starting at offset.
encode(String value, {bool huffman = false}) Uint8List
Encode value as a QPACK string literal.