Handbook
Glossary
<lzw-uncompress> ( input code-size class -- obj )
Vocabulary
compression
.
lzw
Inputs
input
a
bit-reader
code-size
number of bits
class
a
class
Outputs
obj
an
object
Word description
Instantiate a new LZW decompressor.
Definition
USING:
accessors
kernel
math
;
IN:
compression.lzw
:
<lzw-uncompress>
( input code-size class -- obj )
new
swap
[
code-size-zero
]
when-zero
>>code-size
dup
code-size>>
>>initial-code-size
dup
code-size>>
1
-
2^
>>clear-code
dup
clear-code>>
1
+
>>end-of-information-code
swap
>>input
BV{
}
clone
>>output
reset-lzw-uncompress
;