all-patterns ( huffman-code n -- seq )


Vocabulary
compression.huffman.private

Inputs
huffman-codean object
nan object


Outputs
seqan object


Definition


:: 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 ;