mkhdr.sh produces raw HTTP/2 frames but nothing permits to decode them
back, nor to inspect a captured stream. h2dec reads a raw HTTP/2 byte
stream on stdin and prints one line per frame with the 9 header bytes
in hex followed by the decoded type, stream ID, length, flags and pad
length when present. An optional connection preface is detected.
For HEADERS, PUSH_PROMISE and CONTINUATION frames, the header block is
reassembled (padding, priority and promised stream ID are stripped),
and once END_HEADERS is seen, it is decoded with haproxy's own HPACK
decoder (as dev/hpack/decode does) and each field is printed indented
below the frame, in HTTP/1 form ("name: value"), pseudo-headers
appearing as ":name: value". Non-printable characters are escaped. A
single dynamic table is maintained for the whole input, whose size may
be changed with "-s".