-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathREADME
29 lines (18 loc) · 769 Bytes
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
The ez_hash library provides a set of functions and data structures that implement an in-memory hash table.
// initialize a hash table.
ez_hash_table* ez_hash_init(uint32_t n);
// set, get, delete key-value pairs.
uint32_t ez_hash_set(ez_hash_table* h, char* key, char* value);
char* ez_hash_get(ez_hash_table* h, char* key);
int ez_hash_del(ez_hash_table* h, char* key);
// free the hash table
void ez_hash_free(ez_hash_table* h);
The ez_hash library uses the FNV algorithm and source code.
Both the FNV algorithm and source code are in the public domain.
See the file fnv.h included with this software.
$ make
$ sudo make install
Find examples in example.c. Build it like so:
$ make example
$ ./example
usage: ./example bits(1-32) key value [key value]...