| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv static void | allocateHuffmanCodeLengths(final int[]
On input, a sorted array of symbol frequencies; On output, an array of Canonical
Huffman code lengths array, final int The maximum code length. Must be at least maximumLength)ceil(log2(array.length))Allocates Canonical Huffman code lengths in place based on a sorted frequency array. |
| private static void | allocateNodeLengths(final int[]
The code length array array)A final allocation pass with no code length limit. |
| private static void | allocateNodeLengthsWithRelocation(final int[]
The code length array array, final int The number of internal nodes to be relocated nodesToMove, final int The depth at which to insert relocated nodes insertDepth)A final allocation pass that relocates nodes in order to achieve a maximum code length limit. |
| private static int | Returns: The number of nodes to relocateThe code length array array, final int The maximum bit length for the generated codes maximumLength)Finds the number of nodes to relocate in order to achieve a given code length limit. |
| private static int | Returns: The smallestk such that nodesToMove <= k <= i and
i <= (array[k] % array.length)The code length array array, int The input position i, final int The number of internal nodes to be relocated nodesToMove)
|
| private static void | setExtendedParentPointers(final int[]
The code length array array)Fills the code array with extended parent pointers. |
| Bzip2HuffmanAllocator | back to summary |
|---|---|
| private Bzip2HuffmanAllocator() | |
| allocateHuffmanCodeLengths | back to summary |
|---|---|
| pack-priv static void allocateHuffmanCodeLengths(final int[] array, final int maximumLength) Allocates Canonical Huffman code lengths in place based on a sorted frequency array.
| |
| allocateNodeLengths | back to summary |
|---|---|
| private static void allocateNodeLengths(final int[] array) A final allocation pass with no code length limit.
| |
| allocateNodeLengthsWithRelocation | back to summary |
|---|---|
| private static void allocateNodeLengthsWithRelocation(final int[] array, final int nodesToMove, final int insertDepth) A final allocation pass that relocates nodes in order to achieve a maximum code length limit.
| |
| findNodesToRelocate | back to summary |
|---|---|
| private static int findNodesToRelocate(final int[] array, final int maximumLength) Finds the number of nodes to relocate in order to achieve a given code length limit.
| |
| first | back to summary |
|---|---|
private static int first(final int[] array, int i, final int nodesToMove)
| |
| setExtendedParentPointers | back to summary |
|---|---|
| private static void setExtendedParentPointers(final int[] array) Fills the code array with extended parent pointers.
| |