public class MurmurHash extends Object implements Serializable
32-bit Java port of https://code.google.com/p/smhasher/source/browse/trunk/MurmurHash3.cpp#94
128-bit Java port of https://code.google.com/p/smhasher/source/browse/trunk/MurmurHash3.cpp#255
Constructor and Description |
---|
MurmurHash() |
Modifier and Type | Method and Description |
---|---|
static long[] |
hash128(byte[] data)
Murmur3 128-bit 算法.
|
static long[] |
hash128(byte[] data,
int length,
int seed)
Murmur3 128-bit variant.
|
static long[] |
hash128(byte[] data,
int offset,
int length,
int seed)
Murmur3 128-bit variant.
|
static long[] |
hash128(CharSequence data)
Murmur3 128-bit Hash值计算
|
static int |
hash32(byte[] data)
Murmur3 32-bit Hash值计算
|
static int |
hash32(byte[] data,
int length,
int seed)
Murmur3 32-bit Hash值计算
|
static int |
hash32(byte[] data,
int offset,
int length,
int seed)
Murmur3 32-bit Hash值计算
|
static int |
hash32(CharSequence data)
Murmur3 32-bit Hash值计算
|
static long |
hash64(byte[] data)
Murmur3 64-bit 算法
This is essentially MSB 8 bytes of Murmur3 128-bit variant. |
static long |
hash64(byte[] data,
int length,
int seed)
类Murmur3 64-bit 算法
This is essentially MSB 8 bytes of Murmur3 128-bit variant. |
static long |
hash64(CharSequence data)
Murmur3 64-bit Hash值计算
|
public static int hash32(CharSequence data)
data
- 数据public static int hash32(byte[] data)
data
- 数据public static int hash32(byte[] data, int length, int seed)
data
- 数据length
- 长度seed
- 种子,默认0public static int hash32(byte[] data, int offset, int length, int seed)
data
- 数据offset
- 数据开始位置length
- 长度seed
- 种子,默认0public static long hash64(CharSequence data)
data
- 数据public static long hash64(byte[] data)
data
- 数据public static long hash64(byte[] data, int length, int seed)
data
- 数据length
- 长度seed
- 种子,默认0public static long[] hash128(CharSequence data)
data
- 数据public static long[] hash128(byte[] data)
data
- -数据public static long[] hash128(byte[] data, int length, int seed)
data
- 数据length
- 长度seed
- 种子,默认0public static long[] hash128(byte[] data, int offset, int length, int seed)
data
- 数据offset
- 数据开始位置length
- 长度seed
- 种子,默认0Copyright © 2024. All rights reserved.