What is cdb and why does it need your patches?

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.

What does your diff do?

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.

Where can I get the patch?

Simply download cdb-0.75-traversal.diff2.bz2 (uncompressed). Beware: unified diff format (you probably need GNU patch to apply it).

See Also

If you like this, you should probably also go to:

  1. my libdjb project
  2. bzip2, the compressor I used to compress the diff.