Module org.apache.lucene.core
Package org.apache.lucene.util.compress
Class LZ4.HighCompressionHashTable
java.lang.Object
org.apache.lucene.util.compress.LZ4.HashTable
org.apache.lucene.util.compress.LZ4.HighCompressionHashTable
- Enclosing class:
LZ4
A higher-precision
LZ4.HashTable. It stores up to 256 occurrences of 4-bytes sequences in
the last 2^16 bytes, which makes it much more likely to find matches than LZ4.FastCompressionHashTable.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intprivate intprivate byte[]private final short[]private intprivate final int[]private static final intprivate static final intprivate int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidaddHash(int off) (package private) boolean(package private) intget(int off) Advance the cursor tooffand return an index that stored the same 4 bytes asb[o:o+4).(package private) voidinitDictionary(int dictLen) InitdictLenbytes to be used as a dictionary.(package private) intprevious(int off) Return an index that less thanoffand stores the same 4 bytes.(package private) voidreset(byte[] bytes, int off, int len) Reset this hash table in order to compress the given content.
-
Field Details
-
MAX_ATTEMPTS
private static final int MAX_ATTEMPTS- See Also:
-
MASK
private static final int MASK- See Also:
-
bytes
private byte[] bytes -
base
private int base -
next
private int next -
end
private int end -
hashTable
private final int[] hashTable -
chainTable
private final short[] chainTable -
attempts
private int attempts
-
-
Constructor Details
-
HighCompressionHashTable
public HighCompressionHashTable()Sole constructor
-
-
Method Details
-
reset
void reset(byte[] bytes, int off, int len) Description copied from class:LZ4.HashTableReset this hash table in order to compress the given content.- Specified by:
resetin classLZ4.HashTable
-
initDictionary
void initDictionary(int dictLen) Description copied from class:LZ4.HashTableInitdictLenbytes to be used as a dictionary.- Specified by:
initDictionaryin classLZ4.HashTable
-
get
int get(int off) Description copied from class:LZ4.HashTableAdvance the cursor tooffand return an index that stored the same 4 bytes asb[o:o+4). This may only be called on strictly increasing sequences of offsets. A return value of-1indicates that no other index could be found.- Specified by:
getin classLZ4.HashTable
-
addHash
private void addHash(int off) -
previous
int previous(int off) Description copied from class:LZ4.HashTableReturn an index that less thanoffand stores the same 4 bytes. UnlikeLZ4.HashTable.get(int), it doesn't need to be called on increasing offsets. A return value of-1indicates that no other index could be found.- Specified by:
previousin classLZ4.HashTable
-
assertReset
boolean assertReset()- Specified by:
assertResetin classLZ4.HashTable
-