Turnstone Operating System
|
xxHash - Extremely Fast Hash algorithm implementation. More...
Classes | |
struct | xxhash64_context_t |
xxHash 64-bit context structure More... | |
struct | xxhash32_context_t |
xxhash32 context More... | |
Macros | |
#define | XXHASH64_PRIME1 11400714785074694791ULL |
#define | XXHASH64_PRIME2 14029467366897019727ULL |
#define | XXHASH64_PRIME3 1609587929392839161ULL |
#define | XXHASH64_PRIME4 9650029242287828579ULL |
#define | XXHASH64_PRIME5 2870177450012600261ULL |
#define | XXHASH64_MAXBUFFERSIZE 32 |
#define | XXHASH32_PRIME1 2654435761U |
#define | XXHASH32_PRIME2 2246822519U |
#define | XXHASH32_PRIME3 3266489917U |
#define | XXHASH32_PRIME4 668265263U |
#define | XXHASH32_PRIME5 374761393U |
#define | XXHASH32_MAXBUFFERSIZE 16 |
Typedefs | |
typedef struct xxhash64_context_t | xxhash64_context_t |
xxHash 64-bit context type More... | |
typedef struct xxhash32_context_t | xxhash32_context_t |
xxhash32 context type More... | |
Functions | |
MODULE ("turnstone.lib.xxhash") | |
static uint64_t | xxhash64_process_single (uint64_t prev, uint64_t curr) |
process single 64-bit block More... | |
static void | xxhash64_process (const void *data, uint64_t *state0, uint64_t *state1, uint64_t *state2, uint64_t *state3) |
process 64-bit block More... | |
static xxhash64_context_t * | xxhhash64_init_without_malloc (xxhash64_context_t *ctx, uint64_t seed) |
static uint64_t | xxhash64_final_without_free (xxhash64_context_t *ctx) |
uint64_t | xxhash64_hash_with_seed (const void *input, uint64_t length, uint64_t seed) |
calculate xxhash64 value More... | |
xxhash64_context_t * | xxhash64_init (uint64_t seed) |
initialize xxhash64 context More... | |
uint64_t | xxhash64_final (xxhash64_context_t *ctx) |
finalize xxhash64 context More... | |
int8_t | xxhash64_update (xxhash64_context_t *ctx, const void *input, uint64_t length) |
update xxhash64 context More... | |
static uint32_t | xxhash32_process_single (uint32_t prev, uint32_t curr) |
xxhash32 process single More... | |
static void | xxhash32_process (const void *data, uint32_t *state0, uint32_t *state1, uint32_t *state2, uint32_t *state3) |
xxhash32 process block More... | |
uint32_t | xxhash32_hash_with_seed (const void *input, uint64_t length, uint32_t seed) |
calculate xxhash32 value More... | |
xxhash32_context_t * | xxhash32_init (uint32_t seed) |
initialize xxhash32 context More... | |
uint32_t | xxhash32_final (xxhash32_context_t *ctx) |
finalize xxhash32 context More... | |
int8_t | xxhash32_update (xxhash32_context_t *ctx, const void *input, uint64_t length) |
update xxhash32 context More... | |
xxHash - Extremely Fast Hash algorithm implementation.
This work is licensed under TURNSTONE OS Public License. Please read and understand latest version of Licence.
#define XXHASH32_MAXBUFFERSIZE 16 |
xxHash 32-bit max buffer size
#define XXHASH32_PRIME1 2654435761U |
xxHash 32-bit prime constant 1
#define XXHASH32_PRIME2 2246822519U |
xxHash 32-bit prime constant 2
#define XXHASH32_PRIME3 3266489917U |
xxHash 32-bit prime constant 3
#define XXHASH32_PRIME4 668265263U |
xxHash 32-bit prime constant 4
#define XXHASH32_PRIME5 374761393U |
xxHash 32-bit prime constant 5
#define XXHASH64_MAXBUFFERSIZE 32 |
xxHash 64-bit max buffer size
#define XXHASH64_PRIME1 11400714785074694791ULL |
xxHash 64-bit prime constant 1
#define XXHASH64_PRIME2 14029467366897019727ULL |
xxHash 64-bit prime constant 2
#define XXHASH64_PRIME3 1609587929392839161ULL |
xxHash 64-bit prime constant 3
#define XXHASH64_PRIME4 9650029242287828579ULL |
xxHash 64-bit prime constant 4
#define XXHASH64_PRIME5 2870177450012600261ULL |
xxHash 64-bit prime constant 5
xxhash32 context type
opaque xxhash32 context structure
xxHash 64-bit context type
opaque xxhash64 context structure
MODULE | ( | "turnstone.lib.xxhash" | ) |
module name
uint32_t xxhash32_final | ( | xxhash32_context_t * | ctx | ) |
finalize xxhash32 context
call this function after calling xxhash32_update(), also destroy xxhash32 context
[in] | ctx | xxhash32 context |
calculate xxhash32 value
[in] | input | input data |
[in] | length | input data length |
[in] | seed | seed value |
xxhash32_context_t * xxhash32_init | ( | uint32_t | seed | ) |
initialize xxhash32 context
[in] | seed | seed value |
|
inlinestatic |
xxhash32 process block
[in] | data | data |
[in,out] | state0 | state 0 |
[in,out] | state1 | state 1 |
[in,out] | state2 | state 2 |
[in,out] | state3 | state 3 |
xxhash32 process single
[in] | prev | previous value |
[in] | curr | current value |
int8_t xxhash32_update | ( | xxhash32_context_t * | ctx, |
const void * | input, | ||
uint64_t | length | ||
) |
update xxhash32 context
[in] | ctx | xxhash32 context |
[in] | input | input data |
[in] | length | input data length |
uint64_t xxhash64_final | ( | xxhash64_context_t * | ctx | ) |
finalize xxhash64 context
call this function after calling xxhash64_update(), also destroy xxhash64 context
[in] | ctx | xxhash64 context |
calculate xxhash64 value
[in] | input | input data |
[in] | length | input data length |
[in] | seed | seed value |
xxhash64_context_t * xxhash64_init | ( | uint64_t | seed | ) |
initialize xxhash64 context
[in] | seed | seed value |
|
inlinestatic |
process 64-bit block
[in] | data | data |
[in,out] | state0 | state 0 |
[in,out] | state1 | state 1 |
[in,out] | state2 | state 2 |
[in,out] | state3 | state 3 |
process single 64-bit block
[in] | prev | previous value |
[in] | curr | current value |
int8_t xxhash64_update | ( | xxhash64_context_t * | ctx, |
const void * | input, | ||
uint64_t | length | ||
) |
update xxhash64 context
[in] | ctx | xxhash64 context |
[in] | input | input data |
[in] | length | input data length |