Handbook
Glossary
all-patterns ( huffman-code n -- seq )
Vocabulary
compression
.
huffman
.
private
Inputs
huffman-code
an
object
n
an
object
Outputs
seq
an
object
Definition
USING:
accessors
arrays
kernel
math
sequences
;
IN:
compression.huffman.private
::
all-patterns
( huffman-code n -- seq )
n
log2
huffman-code
size>>
-
:>
free-bits free-bits 0
>
[
free-bits
2^
<iota>
[
huffman-code
code>>
free-bits
2^
*
+
]
map
]
[
huffman-code
code>>
free-bits
neg
2^
/i
1array
]
if
;