Handbook
Glossary
decode-integer ( block current-index prefix-length -- block new-index number )
Vocabulary
http2
.
hpack
.
private
Inputs
block
an
object
current-index
an
object
prefix-length
an
object
Outputs
block
an
object
new-index
an
object
number
an
object
Definition
USING:
kernel
math
math.bitwise
sequences
;
IN:
http2.hpack.private
::
decode-integer
( block current-index prefix-length -- block new-index number )
current-index 1
+
:>
end-index! current-index block
nth
prefix-length
2^
1
-
[
mask
]
keep
over
=
[
current-index 1
+
block
[
7
bit?
not
]
find-from
drop
1
+
end-index! current-index 1
+
end-index block
subseq
reverse
0
[
127
mask
swap
128
*
+
]
reduce
+
]
when
[
block end-index
]
dip
;