public final class XxHash extends Object
The C++ source repository: https://github.com/Cyan4973/xxHash. It has a BSD 2-Clause License: http://www.opensource.org/licenses/bsd-license.php. See LICENSE.
Portions of this code were adapted from OpenHFT/Zero-Allocation-Hashing, which has an Apache 2 license as does this site. See LICENSE.
| Modifier and Type | Method and Description |
|---|---|
static long |
hashByteArr(byte[] arr,
long offsetBytes,
long lengthBytes,
long seed)
Hash the given arr starting at the given offset and continuing for the given length using the
given seed.
|
static long |
hashCharArr(char[] arr,
long offsetChars,
long lengthChars,
long seed)
Hash the given arr starting at the given offset and continuing for the given length using the
given seed.
|
static long |
hashDoubleArr(double[] arr,
long offsetDoubles,
long lengthDoubles,
long seed)
Hash the given arr starting at the given offset and continuing for the given length using the
given seed.
|
static long |
hashFloatArr(float[] arr,
long offsetFloats,
long lengthFloats,
long seed)
Hash the given arr starting at the given offset and continuing for the given length using the
given seed.
|
static long |
hashIntArr(int[] arr,
long offsetInts,
long lengthInts,
long seed)
Hash the given arr starting at the given offset and continuing for the given length using the
given seed.
|
static long |
hashLong(long in,
long seed)
Returns a 64-bit hash from a single long.
|
static long |
hashLongArr(long[] arr,
long offsetLongs,
long lengthLongs,
long seed)
Hash the given arr starting at the given offset and continuing for the given length using the
given seed.
|
static long |
hashShortArr(short[] arr,
long offsetShorts,
long lengthShorts,
long seed)
Hash the given arr starting at the given offset and continuing for the given length using the
given seed.
|
static long |
hashString(String str,
long offsetChars,
long lengthChars,
long seed)
Hash the given arr starting at the given offset and continuing for the given length using the
given seed.
|
public static long hashByteArr(byte[] arr,
long offsetBytes,
long lengthBytes,
long seed)
arr - the given arrayoffsetBytes - starting at this offsetlengthBytes - continuing for this lengthseed - the given seedpublic static long hashShortArr(short[] arr,
long offsetShorts,
long lengthShorts,
long seed)
arr - the given arrayoffsetShorts - starting at this offsetlengthShorts - continuing for this lengthseed - the given seedpublic static long hashCharArr(char[] arr,
long offsetChars,
long lengthChars,
long seed)
arr - the given arrayoffsetChars - starting at this offsetlengthChars - continuing for this lengthseed - the given seedpublic static long hashIntArr(int[] arr,
long offsetInts,
long lengthInts,
long seed)
arr - the given arrayoffsetInts - starting at this offsetlengthInts - continuing for this lengthseed - the given seedpublic static long hashLongArr(long[] arr,
long offsetLongs,
long lengthLongs,
long seed)
arr - the given arrayoffsetLongs - starting at this offsetlengthLongs - continuing for this lengthseed - the given seedpublic static long hashLong(long in,
long seed)
in - A long.seed - A long valued seed.public static long hashFloatArr(float[] arr,
long offsetFloats,
long lengthFloats,
long seed)
arr - the given arrayoffsetFloats - starting at this offsetlengthFloats - continuing for this lengthseed - the given seedpublic static long hashDoubleArr(double[] arr,
long offsetDoubles,
long lengthDoubles,
long seed)
arr - the given arrayoffsetDoubles - starting at this offsetlengthDoubles - continuing for this lengthseed - the given seedpublic static long hashString(String str, long offsetChars, long lengthChars, long seed)
str - the given stringoffsetChars - starting at this offsetlengthChars - continuing for this lengthseed - the given seedCopyright © 2015–2024. All rights reserved.