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

49
xxhash.hh Normal file
View File

@@ -0,0 +1,49 @@
/* SPDX-License-Identifier: Apache-2.0
* (c) 2025, Konstantin Demin
*/
#ifndef INCLUDE_XXHASH_HH
#define INCLUDE_XXHASH_HH 1
#include <limits.h>
#if LONG_MAX == INT_MAX
#define XXH_NO_LONG_LONG
#endif
// #define XXH_NO_EXTERNC_GUARD
#define XXH_NO_STDLIB
#define XXH_STATIC_LINKING_ONLY
#define XXH_NO_XXH3
#define XXH_NO_INLINE_HINTS 1
#define XXH_SIZE_OPT 2
#if defined(__BYTE_ORDER__) && defined(__ORDER_LITTLE_ENDIAN__)
#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
#define XXH_CPU_LITTLE_ENDIAN 1
#endif
#endif
#if defined(__BYTE_ORDER__) && defined(__ORDER_BIG_ENDIAN__)
#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
#define XXH_CPU_LITTLE_ENDIAN 0
#endif
#endif
#ifdef USE_BUNDLED_XXHASH
#include "xxhash.h"
#else /* !USE_BUNDLED_XXHASH */
#include <xxhash.h>
#endif /* USE_BUNDLED_XXHASH */
#ifndef XXH_NO_LONG_LONG
#define xxhash_t XXH64_hash_t
#else
#define xxhash_t XXH32_hash_t
#endif
xxhash_t xxhash(const void * input, size_t len, xxhash_t seed = 0);
#endif /* INCLUDE_XXHASH_HH */