src/hpack/decoder

HPACK decoder

Procs

proc hdecode(s: openArray[byte]; dh: var Hpack; ss: var seq[byte];
             nn, vv: var Slice[int]; dhSize: var int): int {.
    ...raises: [DecodeError], raises: [], tags: [], forbids: [].}
Decode a single header. Return number of consumed octets. s bytes sequence must not be empty. dhSize will contain the dynamic table size update or -1 otherwise
proc hdecode(s: openArray[byte]; dh: var Hpack; ss: var string;
             nn, vv: var Slice[int]; dhSize: var int): int {.
    ...raises: [DecodeError], raises: [], tags: [], forbids: [].}
Compat; slower than the seq[byte] version
proc hdecodeAll(s: openArray[byte]; dh: var Hpack; ss: var seq[byte];
                bb: var seq[HpackBound]) {....raises: [DecodeError], raises: [],
    tags: [], forbids: [].}
Decode all headers from the blob of bytes s and stores it into a decoded stringd. The dynamic headers are stored into h to decode the next message.
proc hdecodeAll(s: openArray[byte]; dh: var Hpack; ss: var string;
                bb: var seq[HpackBound]) {....raises: [DecodeError], raises: [],
    tags: [], forbids: [].}
Compat; slower than the seq[byte] version