Handbook
Glossary
generate-codes ( lit-seq -- code-dict )
Vocabulary
compression
.
huffman
.
private
Inputs
lit-seq
an
object
Outputs
code-dict
an
object
Definition
USING:
heaps
kernel
namespaces
sequences
;
IN:
compression.huffman.private
:
generate-codes
( lit-seq -- code-dict )
[
[
H{
}
clone
]
[
H{
}
clone
leaf-table
set
<min-heap>
node-heap
set
build-tree
heap-pop
swap
(generate-codes)
nip
]
if-empty
]
with-scope
;