1 ! Copyright (C) 2021 Your name.
2 ! See https://factorcode.org/license.txt for BSD license.
3 USING: byte-arrays help.markup help.syntax sequences strings ;
7 { $class-description "Stores the context for a hpack decoder or encoder. This is primarily the current state of the dynamic table." } ;
11 { "decode-context" hpack-context } { "block" byte-array }
12 { "updated-context" hpack-context } { "decoded" sequence }
14 { $description "Decodes the given byte array (or byte vector) in the given hpack context. Outputs the updated context, and the decoded header block as a sequence of pairs." } ;
16 HELP: hpack-decode-error
18 { "error-msg" string }
20 { $description "Throws a " { $link hpack-decode-error } " error." }
21 { $error-description "Thrown for any of the possible errors specified in RFC7541 for decoding hpack encoded byte strings." } ;
25 { "encode-context" hpack-context } { "headers" sequence }
26 { "updated-context" hpack-context } { "block" byte-array }
28 { $description "Encodes the sequence of headers using the given context. Outputs the updated context and the encoded header block, as a byte array." } ;
30 ARTICLE: "http2.hpack" "HTTP/2 HPACK"
31 { $vocab-link "http2.hpack" }
34 { hpack-encode hpack-decode } related-words