cdb is DJ Bernstein's great constant database library. It allows the fast creation and access to read-only databases. The creation is fast enough to create those databases often and the access is very fast and uses only very little code. Also, there are no corruption or locking issues at all.
Unfortunately, the cdb API has no way to dump all records in a cdb. I need this functionality for another project called rdbm that I will release soon, hopefully. rdbm will add write access to cdb using a journal and it will handle concurrent accesses by offering a TCP server.
My diff adds simple support for traversing a cdb, i.e. listing all keys in a cdb. It also adds a new target called "traverse" that is an example program that will dump the cdb you name on the command line and a target called "cdbnext" that can list the key following the key given on the command line.
Simply download cdb-0.75-traversal.diff2.bz2 (uncompressed). Beware: unified diff format (you probably need GNU patch to apply it).
If you like this, you should probably also go to: