sqlmapproject/sqlmap · error · H2CompressionError

invalid Huffman sequence

Error message

invalid Huffman sequence

What it means

Error "invalid Huffman sequence" thrown in sqlmapproject/sqlmap.

Source

Thrown at lib/request/http2.py:351

                    raise AssertionError("invalid prefix Huffman table")
                node = child


_build_huffman_trie()


def huffman_decode(data):
    data = _as_bytes(data)
    out = bytearray()
    node = _HUFF_ROOT
    consumed = 0
    tail = 0
    for item in bytearray(data):
        for index in range(7, -1, -1):
            bit = (item >> index) & 1
            nxt = node.get(bit)
            if nxt is None:
                raise H2CompressionError("invalid Huffman sequence")
            consumed += 1
            tail = (tail << 1) | bit
            if isinstance(nxt, dict):
                node = nxt
            else:
                out.append(nxt)
                node = _HUFF_ROOT
                consumed = 0
                tail = 0
    if node is not _HUFF_ROOT:
        if consumed > 7 or tail != (1 << consumed) - 1:
            raise H2CompressionError("invalid Huffman EOS padding")
    return bytes(out)


# ---------- HPACK integer/string ----------
def encode_integer(value, prefix_bits, first_byte=0):
    if not isinstance(value, integer_types) or value < 0:

View on GitHub (pinned to 0a35b20e39)

When it happens

Trigger: Thrown at lib/request/http2.py:351 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of sqlmapproject/sqlmap@0a35b20e39 (2026-08-26). Data as JSON: /api/errors/323d200b420a5598. Report an issue: GitHub.