|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
@InterfaceAudience.Private public interface Dictionary
Dictionary interface Dictionary indexes should be either bytes or shorts, only positive. (The first bit is reserved for detecting whether something is compressed or not).
| Field Summary | |
|---|---|
static byte |
NOT_IN_DICTIONARY
|
| Method Summary | |
|---|---|
short |
addEntry(byte[] data,
int offset,
int length)
Adds an entry to the dictionary. |
void |
clear()
Flushes the dictionary, empties all values. |
short |
findEntry(byte[] data,
int offset,
int length)
Finds the index of an entry. |
byte[] |
getEntry(short idx)
Gets an entry from the dictionary. |
void |
init(int initialSize)
|
| Field Detail |
|---|
static final byte NOT_IN_DICTIONARY
| Method Detail |
|---|
void init(int initialSize)
byte[] getEntry(short idx)
idx - index of the entry
short findEntry(byte[] data,
int offset,
int length)
data - the byte array that we're looking upoffset - Offset into data to add to Dictionary.length - Length beyond offset that comprises entry; must be > 0.
NOT_IN_DICTIONARY if not found
short addEntry(byte[] data,
int offset,
int length)
findEntry(byte[], int, int)} to add without duplicating
dictionary entries.
data - the entry to addoffset - Offset into data to add to Dictionary.length - Length beyond offset that comprises entry; must be > 0.
void clear()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||