Handbook
Glossary
length-limit-codes ( max-len old-codes -- new-codes )
Vocabulary
compression
.
huffman
.
private
Inputs
max-len
an
object
old-codes
an
object
Outputs
new-codes
an
object
Definition
USING:
assocs
kernel
math
sequences
;
IN:
compression.huffman.private
::
length-limit-codes
( max-len old-codes -- new-codes )
old-codes
[
length
]
assoc-map
[
dup
length
max-len
<
[
drop
max-len
]
when
]
assoc-map
;