| Modifier and Type | Class and Description |
|---|---|
| protected static class |
| Modifier and Type | Field and Description |
|---|---|
| private static final int[] | DECODING_TABLE
array based tree representation of a huffman code. |
| private static final int | |
| private static final HPackHuffman. | |
| private static final int | |
| private static final int | |
| protected static final StringManager |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static void | decode(ByteBuffer
The byte buffer data, int The length of data from the buffer to decode length, StringBuilder The target for the decompressed data target)Decodes a huffman encoded string into the target StringBuilder. |
| public static boolean | Returns: true if encoding succeededThe buffer to encode into buffer, String The string to encode toEncode, boolean If the string should be encoded in lower case forceLowercase)Encodes the given string into the buffer. |
| DECODING_TABLE | back to summary |
|---|---|
| private static final int[] DECODING_TABLE array based tree representation of a huffman code. the high two bytes corresponds to the tree node if the bit is set, and the low two bytes for if it is clear if the high bit is set it is a terminal node, otherwise it contains the next node position. | |
| HIGH_TERMINAL_BIT | back to summary |
|---|---|
| private static final int HIGH_TERMINAL_BIT | |
| HUFFMAN_CODES | back to summary |
|---|---|
| private static final HPackHuffman. | |
| LOW_MASK | back to summary |
|---|---|
| private static final int LOW_MASK | |
| LOW_TERMINAL_BIT | back to summary |
|---|---|
| private static final int LOW_TERMINAL_BIT | |
| sm | back to summary |
|---|---|
| protected static final StringManager sm | |
| HPackHuffman | back to summary |
|---|---|
| public HPackHuffman() | |
| decode | back to summary |
|---|---|
| public static void decode(ByteBuffer data, int length, StringBuilder target) throws HpackException Decodes a huffman encoded string into the target StringBuilder. There must be enough space left in the buffer for this method to succeed.
| |
| encode | back to summary |
|---|---|
| public static boolean encode(ByteBuffer buffer, String toEncode, boolean forceLowercase) Encodes the given string into the buffer. If there is not enough space in the buffer, or the encoded version is bigger than the original it will return false and not modify the buffers position.
| |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv int | length
length of the code, in bits |
| pack-priv int | value
The value of the least significant bits of the code |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | equals(Object
the reference object with which to compare. o)Overrides java. Indicates whether some other object is "equal to" this one. |
| public int | |
| public int | |
| public int | |
| public String |
| length | back to summary |
|---|---|
| pack-priv int length length of the code, in bits | |
| value | back to summary |
|---|---|
| pack-priv int value The value of the least significant bits of the code | |
| HuffmanCode | back to summary |
|---|---|
| public HuffmanCode(int value, int length) | |
| equals | back to summary |
|---|---|
| public boolean equals(Object o) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| getLength | back to summary |
|---|---|
| public int getLength() | |
| getValue | back to summary |
|---|---|
| public int getValue() | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |