Handbook
Glossary
read-code ( table reader -- symbol )
Vocabulary
compression
.
deflate
.
private
Inputs
table
an
object
reader
an
object
Outputs
symbol
an
object
Definition
USING:
assocs
compression.deflate
kernel
math
;
IN:
compression.deflate.private
::
read-code
( table reader -- symbol )
1
:>
code!
f
:>
symbol! 0
:>
n!
[
symbol
not
n 15
<
and
]
[
code 2
*
1 reader
read-bits
+
code! code table
at
symbol! n 1
+
n!
]
while
symbol
[
symbol
]
[
"invalid Huffman code"
invalid-deflate
]
if
;