change(libs): use a 4MiB buffer by default in murmur2 hashing

Signed-off-by: flow <flowlnlnln@gmail.com>
This commit is contained in:
flow 2022-07-24 15:12:29 -03:00
parent 631a93bcd8
commit 24c034ff6a
No known key found for this signature in database
GPG Key ID: 8D0F221F0A59F469

View File

@ -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;