VR-Vantage
Loading...
Searching...
No Matches
xxhash.h File Reference

Go to the source code of this file.

Classes

struct  XXH32_canonical_t
struct  XXH64_canonical_t

Macros

#define XXH_PUBLIC_API   /* do nothing */
 XXH_PRIVATE_API This is useful to include xxhash functions in static mode in order to inline them, and remove their symbol from the public list.
#define XXH_VERSION_MAJOR   0
#define XXH_VERSION_MINOR   6
#define XXH_VERSION_RELEASE   2
#define XXH_VERSION_NUMBER   (XXH_VERSION_MAJOR *100*100 + XXH_VERSION_MINOR *100 + XXH_VERSION_RELEASE)

Typedefs

typedef unsigned int XXH32_hash_t
typedef struct XXH32_state_s XXH32_state_t
typedef unsigned long long XXH64_hash_t
typedef struct XXH64_state_s XXH64_state_t

Enumerations

enum  XXH_errorcode { XXH_OK =0 , XXH_ERROR }

Functions

XXH_PUBLIC_API unsigned XXH_versionNumber (void)
XXH_PUBLIC_API XXH32_hash_t XXH32 (const void *input, size_t length, unsigned int seed)
XXH_PUBLIC_API XXH32_state_t * XXH32_createState (void)
XXH_PUBLIC_API XXH_errorcode XXH32_freeState (XXH32_state_t *statePtr)
XXH_PUBLIC_API void XXH32_copyState (XXH32_state_t *dst_state, const XXH32_state_t *src_state)
XXH_PUBLIC_API XXH_errorcode XXH32_reset (XXH32_state_t *statePtr, unsigned int seed)
XXH_PUBLIC_API XXH_errorcode XXH32_update (XXH32_state_t *statePtr, const void *input, size_t length)
XXH_PUBLIC_API XXH32_hash_t XXH32_digest (const XXH32_state_t *statePtr)
XXH_PUBLIC_API void XXH32_canonicalFromHash (XXH32_canonical_t *dst, XXH32_hash_t hash)
XXH_PUBLIC_API XXH32_hash_t XXH32_hashFromCanonical (const XXH32_canonical_t *src)
XXH_PUBLIC_API XXH64_hash_t XXH64 (const void *input, size_t length, unsigned long long seed)
XXH_PUBLIC_API XXH64_state_t * XXH64_createState (void)
XXH_PUBLIC_API XXH_errorcode XXH64_freeState (XXH64_state_t *statePtr)
XXH_PUBLIC_API void XXH64_copyState (XXH64_state_t *dst_state, const XXH64_state_t *src_state)
XXH_PUBLIC_API XXH_errorcode XXH64_reset (XXH64_state_t *statePtr, unsigned long long seed)
XXH_PUBLIC_API XXH_errorcode XXH64_update (XXH64_state_t *statePtr, const void *input, size_t length)
XXH_PUBLIC_API XXH64_hash_t XXH64_digest (const XXH64_state_t *statePtr)
XXH_PUBLIC_API void XXH64_canonicalFromHash (XXH64_canonical_t *dst, XXH64_hash_t hash)
XXH_PUBLIC_API XXH64_hash_t XXH64_hashFromCanonical (const XXH64_canonical_t *src)

Macro Definition Documentation

◆ XXH_PUBLIC_API

#define XXH_PUBLIC_API   /* do nothing */

XXH_PRIVATE_API This is useful to include xxhash functions in static mode in order to inline them, and remove their symbol from the public list.

Methodology : #define XXH_PRIVATE_API #include "xxhash.h" xxhash.c is automatically included. It's not useful to compile and link it as a separate module.

Referenced by XXH32(), XXH32_canonicalFromHash(), XXH32_copyState(), XXH32_createState(), XXH32_digest(), XXH32_freeState(), XXH32_hashFromCanonical(), XXH32_reset(), XXH32_update(), XXH64(), XXH64_canonicalFromHash(), XXH64_copyState(), XXH64_createState(), XXH64_digest(), XXH64_freeState(), XXH64_hashFromCanonical(), XXH64_reset(), XXH64_update(), and XXH_versionNumber().

◆ XXH_VERSION_MAJOR

#define XXH_VERSION_MAJOR   0

XXH_NAMESPACE, aka Namespace Emulation :

If you want to include and expose xxHash functions from within your own library, but also want to avoid symbol collisions with other libraries which may also include xxHash,

you can use XXH_NAMESPACE, to automatically prefix any public symbol from xxhash library with the value of XXH_NAMESPACE (therefore, avoid NULL and numeric values).

Note that no change is required within the calling program as long as it includes xxhash.h : regular symbol name will be automatically translated by this header.

◆ XXH_VERSION_MINOR

#define XXH_VERSION_MINOR   6

◆ XXH_VERSION_RELEASE

#define XXH_VERSION_RELEASE   2

◆ XXH_VERSION_NUMBER

#define XXH_VERSION_NUMBER   (XXH_VERSION_MAJOR *100*100 + XXH_VERSION_MINOR *100 + XXH_VERSION_RELEASE)

Typedef Documentation

◆ XXH32_hash_t

typedef unsigned int XXH32_hash_t

◆ XXH32_state_t

typedef struct XXH32_state_s XXH32_state_t

◆ XXH64_hash_t

typedef unsigned long long XXH64_hash_t

◆ XXH64_state_t

typedef struct XXH64_state_s XXH64_state_t

Enumeration Type Documentation

◆ XXH_errorcode

Enumerator
XXH_OK 
XXH_ERROR 

Function Documentation

◆ XXH_versionNumber()

XXH_PUBLIC_API unsigned XXH_versionNumber ( void )

References XXH_PUBLIC_API.

◆ XXH32()

XXH_PUBLIC_API XXH32_hash_t XXH32 ( const void * input,
size_t length,
unsigned int seed )

XXH32() : Calculate the 32-bits hash of sequence "length" bytes stored at memory address "input". The memory between input & input+length must be valid (allocated and read-accessible). "seed" can be used to alter the result predictably. Speed on Core 2 Duo @ 3 GHz (single thread, SMHasher benchmark) : 5.4 GB/s

References XXH_PUBLIC_API.

◆ XXH32_createState()

XXH_PUBLIC_API XXH32_state_t * XXH32_createState ( void )

References XXH_PUBLIC_API.

◆ XXH32_freeState()

XXH_PUBLIC_API XXH_errorcode XXH32_freeState ( XXH32_state_t * statePtr)

References XXH_PUBLIC_API.

◆ XXH32_copyState()

XXH_PUBLIC_API void XXH32_copyState ( XXH32_state_t * dst_state,
const XXH32_state_t * src_state )

References XXH_PUBLIC_API.

◆ XXH32_reset()

XXH_PUBLIC_API XXH_errorcode XXH32_reset ( XXH32_state_t * statePtr,
unsigned int seed )

References XXH_PUBLIC_API.

◆ XXH32_update()

XXH_PUBLIC_API XXH_errorcode XXH32_update ( XXH32_state_t * statePtr,
const void * input,
size_t length )

References XXH_PUBLIC_API.

◆ XXH32_digest()

XXH_PUBLIC_API XXH32_hash_t XXH32_digest ( const XXH32_state_t * statePtr)

References XXH_PUBLIC_API.

◆ XXH32_canonicalFromHash()

XXH_PUBLIC_API void XXH32_canonicalFromHash ( XXH32_canonical_t * dst,
XXH32_hash_t hash )

References dst, and XXH_PUBLIC_API.

◆ XXH32_hashFromCanonical()

XXH_PUBLIC_API XXH32_hash_t XXH32_hashFromCanonical ( const XXH32_canonical_t * src)

References XXH_PUBLIC_API.

◆ XXH64()

XXH_PUBLIC_API XXH64_hash_t XXH64 ( const void * input,
size_t length,
unsigned long long seed )

XXH64() : Calculate the 64-bits hash of sequence of length "len" stored at memory address "input". "seed" can be used to alter the result predictably. This function runs faster on 64-bits systems, but slower on 32-bits systems (see benchmark).

References XXH_PUBLIC_API.

◆ XXH64_createState()

XXH_PUBLIC_API XXH64_state_t * XXH64_createState ( void )

References XXH_PUBLIC_API.

◆ XXH64_freeState()

XXH_PUBLIC_API XXH_errorcode XXH64_freeState ( XXH64_state_t * statePtr)

References XXH_PUBLIC_API.

◆ XXH64_copyState()

XXH_PUBLIC_API void XXH64_copyState ( XXH64_state_t * dst_state,
const XXH64_state_t * src_state )

References XXH_PUBLIC_API.

◆ XXH64_reset()

XXH_PUBLIC_API XXH_errorcode XXH64_reset ( XXH64_state_t * statePtr,
unsigned long long seed )

References XXH_PUBLIC_API.

◆ XXH64_update()

XXH_PUBLIC_API XXH_errorcode XXH64_update ( XXH64_state_t * statePtr,
const void * input,
size_t length )

References XXH_PUBLIC_API.

◆ XXH64_digest()

XXH_PUBLIC_API XXH64_hash_t XXH64_digest ( const XXH64_state_t * statePtr)

References XXH_PUBLIC_API.

◆ XXH64_canonicalFromHash()

XXH_PUBLIC_API void XXH64_canonicalFromHash ( XXH64_canonical_t * dst,
XXH64_hash_t hash )

References dst, and XXH_PUBLIC_API.

◆ XXH64_hashFromCanonical()

XXH_PUBLIC_API XXH64_hash_t XXH64_hashFromCanonical ( const XXH64_canonical_t * src)

References XXH_PUBLIC_API.