Class XXHash32
- java.lang.Object
-
- org.apache.commons.compress.compressors.lz4.XXHash32
-
- All Implemented Interfaces:
java.util.zip.Checksum
public class XXHash32 extends java.lang.Object implements java.util.zip.Checksum
Implementation of the xxhash32 hash algorithm.- Since:
- 1.14
- See Also:
- xxHash
-
-
Field Summary
Fields Modifier and Type Field Description private static int
BUF_SIZE
private byte[]
buffer
private byte[]
oneByte
private int
pos
private static int
PRIME1
private static int
PRIME2
private static int
PRIME3
private static int
PRIME4
private static int
PRIME5
private static int
ROTATE_BITS
private int
seed
private int[]
state
private int
totalLen
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static int
getInt(byte[] buffer, int idx)
long
getValue()
private void
initializeState()
private void
process(byte[] b, int offset)
void
reset()
void
update(byte[] b, int off, int len)
void
update(int b)
-
-
-
Field Detail
-
BUF_SIZE
private static final int BUF_SIZE
- See Also:
- Constant Field Values
-
ROTATE_BITS
private static final int ROTATE_BITS
- See Also:
- Constant Field Values
-
PRIME1
private static final int PRIME1
- See Also:
- Constant Field Values
-
PRIME2
private static final int PRIME2
- See Also:
- Constant Field Values
-
PRIME3
private static final int PRIME3
- See Also:
- Constant Field Values
-
PRIME4
private static final int PRIME4
- See Also:
- Constant Field Values
-
PRIME5
private static final int PRIME5
- See Also:
- Constant Field Values
-
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
-
-
Method Detail
-
reset
public void reset()
- Specified by:
reset
in interfacejava.util.zip.Checksum
-
update
public void update(int b)
- Specified by:
update
in interfacejava.util.zip.Checksum
-
update
public void update(byte[] b, int off, int len)
- Specified by:
update
in interfacejava.util.zip.Checksum
-
getValue
public long getValue()
- Specified by:
getValue
in interfacejava.util.zip.Checksum
-
getInt
private static int getInt(byte[] buffer, int idx)
-
initializeState
private void initializeState()
-
process
private void process(byte[] b, int offset)
-
-