1
0

initial commit

This commit is contained in:
2025-05-27 11:36:06 +03:00
commit 4ba42acfea
14 changed files with 1584 additions and 0 deletions

26
xxhash.cc Normal file
View File

@@ -0,0 +1,26 @@
/* SPDX-License-Identifier: Apache-2.0
* (c) 2025, Konstantin Demin
*/
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif
#define XXH_IMPLEMENTATION
#include "xxhash.hh"
xxhash_t xxhash(const void * input, size_t len, xxhash_t seed)
{
#ifndef XXH_NO_LONG_LONG
XXH64_state_t st;
XXH64_reset(&st, seed);
XXH64_update(&st, input, len);
return XXH64_digest(&st);
#else
XXH32_state_t st;
XXH32_reset(&st, seed);
XXH32_update(&st, input, len);
return XXH32_digest(&st);
#endif
}