public class HuffmanAllocator extends Object
Modifier and Type | Method and Description |
---|---|
static void |
allocateHuffmanCodeLengths(int[] array,
int maximumLength)
Allocates Canonical Huffman code lengths in place based on a sorted frequency array
|
public static void allocateHuffmanCodeLengths(int[] array, int maximumLength)
array
- On input, a sorted array of symbol frequencies; On output, an array of Canonical
Huffman code lengthsmaximumLength
- The maximum code length. Must be at least ceil(log2(array.length))
Copyright © 2018. All rights reserved.