Handbook
Glossary
decode-huff-table ( chunk -- )
Vocabulary
images
.
jpeg
.
private
Inputs
chunk
an
object
Outputs
None
Definition
USING:
accessors
io
io.encodings.binary
io.streams.byte-array
io.streams.limited
io.streams.throwing
kernel
math
namespaces
sequences
;
IN:
images.jpeg.private
:
decode-huff-table
( chunk -- )
data>>
[
binary
<byte-reader>
]
[
length
]
bi
limit-stream
[
[
input-stream
get
stream>>
[
count>>
]
[
limit>>
]
bi
<
]
[
read4/4
swap
2
*
+
16
read
dup
[
]
[
+
]
map-reduce
read
binary
[
[
read
[
~byte-array~
]
unless*
]
{
}
map-as
]
with-byte-reader
swap
jpeg>
huff-tables>>
set-nth
]
while
]
stream-throw-on-eof
;