httpy.http2.hpack package

Subpackages

Submodules

httpy.http2.hpack.const module

httpy.http2.hpack.errors module

exception httpy.http2.hpack.errors.DecodingError

Bases: HPackError

exception httpy.http2.hpack.errors.EncodingError

Bases: HPackError

exception httpy.http2.hpack.errors.HPackError

Bases: HTTPyError

exception httpy.http2.hpack.errors.HuffmanDecodingError

Bases: HuffmanError, DecodingError

exception httpy.http2.hpack.errors.HuffmanEncodingError

Bases: HuffmanError, EncodingError

exception httpy.http2.hpack.errors.HuffmanError

Bases: HPackError

httpy.http2.hpack.hpack module

class httpy.http2.hpack.hpack.Decoder

Bases: object

A HPACK decoder

decode_headers(b)

Decodes multiple headers with the current dynamic table

class httpy.http2.hpack.hpack.Encoder

Bases: object

A HPACK encoder

encode_header(header, huffman=True)

Encodes a single header with the current table

encode_headers(headers, huffman=True)

Encodes multiple headers with the current table

class httpy.http2.hpack.hpack.HPACK

Bases: Encoder, Decoder

A HPACK encoder/decoder pair with a shared dynamic table

httpy.http2.hpack.huffman module

httpy.http2.hpack.huffman.decode_huffman(inp)

Decodes a Huffman-encoded byte sequence with the HPACK Huffman table

httpy.http2.hpack.huffman.encode_huffman(inp)

Encodes a byte sequence using Huffman encoding with the HPACK Huffman table

httpy.http2.hpack.integer module

httpy.http2.hpack.integer.decode_int(barr, n=7)
httpy.http2.hpack.integer.encode_int(i, n=7, return_int=False)

httpy.http2.hpack.table module

class httpy.http2.hpack.table.Entry(name, value=None)

Bases: object

A HPACK table entry.

property size
class httpy.http2.hpack.table.Table(max_size=4096)

Bases: object

A HPACK table implementation

add(entry)

Adds an entry to the dynamic table

change_size(new_size)

Changes the dynamic table size by removing items

find_item(item)

Returns the index of an item in the table

Module contents