Package net.jpountz.xxhash
Class XXHash64
java.lang.Object
net.jpountz.xxhash.XXHash64
A 64-bits hash.
Instances of this class are thread-safe.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract long
hash
(byte[] buf, int off, int len, long seed) Computes the 64-bits hash ofbuf[off:off+len]
using seedseed
.abstract long
hash
(ByteBuffer buf, int off, int len, long seed) Computes the hash of the given slice of theByteBuffer
.final long
hash
(ByteBuffer buf, long seed) Computes the hash of the givenByteBuffer
.toString()
-
Constructor Details
-
XXHash64
public XXHash64()
-
-
Method Details
-
hash
public abstract long hash(byte[] buf, int off, int len, long seed) Computes the 64-bits hash ofbuf[off:off+len]
using seedseed
.- Parameters:
buf
- the input dataoff
- the start offset in buflen
- the number of bytes to hashseed
- the seed to use- Returns:
- the hash value
-
hash
- Parameters:
buf
- the input dataoff
- the start offset in buflen
- the number of bytes to hashseed
- the seed to use- Returns:
- the hash value
-
hash
Computes the hash of the givenByteBuffer
. Theposition
is moved in order to reflect bytes which have been read.- Parameters:
buf
- the input dataseed
- the seed to use- Returns:
- the hash value
-
toString
-