Added ndpi_bitmap64 support

This commit is contained in:
Luca Deri
2023-09-05 00:21:16 +02:00
parent 4f2ce2d43b
commit c5ebd84fd8
7 changed files with 852 additions and 19 deletions
+15
View File
@@ -48,6 +48,21 @@ u_int32_t ndpi_quick_hash(unsigned char *str, u_int str_len) {
/* ******************************************************************** */
/* Based on Daniel Lemire code */
u_int64_t ndpi_quick_hash64(char *str, u_int str_len) {
u_int64_t h = 0;
u_int i;
for(i=0; i<str_len; i++)
h = (h * 177) + str[i];
h ^= strlen(str);
return h;
}
/* ******************************************************************** */
/*
https://en.wikipedia.org/wiki/Jenkins_hash_function