Attached is a toy program to illustrate the new POPT_ARG_BITSET API in
The toy program uses /usr/share/dict/words as a attribute
universe, and checks arguments to see if they are in the
Here's some usage examples
$ wc -l /usr/share/dict/words
$ ./tdict @@@@ XyZZy
===== No words are in /usr/share/dict/words
$ ./tdict foo bar baz @@@@ XyZZy
===== Some words are in /usr/share/dict/words
===== poptBits N:959654 M:1439481 K:2 (176Kb) total(5) = hits(3) +
The API doesn't look too bad imho. Other opinions?
Choosing a reasonably sane default for the Bloom filter's N/M/K
parameters in popt will still need some adjustment.
73 de Jeff
Received on Sun Jul 26 21:34:54 2009
- application/octet-stream attachment: tdict.c