Modifier and Type | Class and Description |
---|---|
private static class |
Compression.Entry |
Modifier and Type | Field and Description |
---|---|
private static int |
MAX_POINTER |
private Compression.Entry[] |
table |
private static int |
TABLE_SIZE |
Constructor and Description |
---|
Compression()
Creates a new Compression object.
|
Modifier and Type | Method and Description |
---|---|
void |
add(int pos,
Name name)
Adds a compression entry mapping a name to a position in a message.
|
int |
get(Name name)
Retrieves the position of the given name, if it has been previously included in the message.
|
private static final int TABLE_SIZE
private static final int MAX_POINTER
private final Compression.Entry[] table
public void add(int pos, Name name)
pos
- The position at which the name is added.name
- The name being added to the message.public int get(Name name)
name
- The name to find in the compression table.