Class XXHash32
java.lang.Object
org.apache.commons.compress.compressors.lz4.XXHash32
- All Implemented Interfaces:
Checksum
Implementation of the xxhash32 hash algorithm.
- Since:
- 1.14
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final intprivate final byte[]private final byte[]private intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate final intprivate final int[]private int -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
BUF_SIZE
private static final int BUF_SIZE- See Also:
-
ROTATE_BITS
private static final int ROTATE_BITS- See Also:
-
PRIME1
private static final int PRIME1- See Also:
-
PRIME2
private static final int PRIME2- See Also:
-
PRIME3
private static final int PRIME3- See Also:
-
PRIME4
private static final int PRIME4- See Also:
-
PRIME5
private static final int PRIME5- See Also:
-
oneByte
private final byte[] oneByte -
state
private final int[] state -
buffer
private final byte[] buffer -
seed
private final int seed -
totalLen
private int totalLen -
pos
private int pos
-
-
Constructor Details
-
XXHash32
public XXHash32()Creates an XXHash32 instance with a seed of 0. -
XXHash32
public XXHash32(int seed) Creates an XXHash32 instance.- Parameters:
seed- the seed to use
-
-
Method Details
-
getInt
private static int getInt(byte[] buffer, int idx) -
getValue
public long getValue() -
initializeState
private void initializeState() -
process
private void process(byte[] b, int offset) -
reset
public void reset() -
update
public void update(byte[] b, int off, int len) -
update
public void update(int b)
-