Download Latest Version ez_hash.tar.gz (38.1 kB)
Email in envelope

Get an email when there's a new version of ez_hash

Home
Name Modified Size InfoDownloads / Week
ez_echo 2010-06-13
README 2010-07-05 834 Bytes
ez_hash.tar.gz 2010-07-01 38.1 kB
Totals: 3 Items   38.9 kB 1
The ez_hash library provides a set of functions and data structures that implement a 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
uint32_t 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.


Build and install instructions:

$ tar zxvf ez_hash.tar.gz
$ cd ez_hash
$ make
$ sudo make install

Find some usage examples in main.c. Build it like so:

$ make main

$ ./main
usage: ./main key value

$ ./main fred flintstone


Source: README, updated 2010-07-05