Handbook
Glossary
hpack-decode ( decode-context block -- updated-context decoded )
Vocabulary
http2
.
hpack
Inputs
decode-context
a
hpack-context
block
a
byte-array
Outputs
updated-context
a
hpack-context
decoded
a
sequence
Word 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.
See also
hpack-encode
Definition
USING:
arrays
http2.hpack.private
kernel
locals.backend
math
sequences
;
IN:
http2.hpack
:
hpack-decode
( decode-context block -- updated-context decoded )
V{
}
clone
load-local
0
[
2dup
swap
length
<
]
0
get-local
[
load-local
decode-field
0
get-local
[
load-local
0
get-local
push
1
drop-locals
]
curry
0
get-local
[
load-local
0
get-local
[
"Table size update not at start of header block"
hpack-decode-error
]
unless-empty
1
drop-locals
]
curry
if*
1
drop-locals
]
curry
while
2drop
0
get-local
>array
1
drop-locals
;