change(libs): use a 4MiB buffer by default in murmur2 hashing
Signed-off-by: flow <flowlnlnln@gmail.com>
This commit is contained in:
parent
631a93bcd8
commit
24c034ff6a
@ -15,10 +15,13 @@
|
|||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#define KiB 1024
|
||||||
|
#define MiB 1024*KiB
|
||||||
|
|
||||||
uint32_t MurmurHash2(
|
uint32_t MurmurHash2(
|
||||||
std::ifstream&& file_stream,
|
std::ifstream&& file_stream,
|
||||||
std::size_t buffer_size = 4096,
|
std::size_t buffer_size = 4*MiB,
|
||||||
std::function<bool(char)> filter_out = [](char) { return true; });
|
std::function<bool(char)> filter_out = [](char) { return false; });
|
||||||
|
|
||||||
struct IncrementalHashInfo {
|
struct IncrementalHashInfo {
|
||||||
uint32_t h;
|
uint32_t h;
|
||||||
|
Loading…
Reference in New Issue
Block a user