CDB(5) File Formats Manual CDB(5)

cdbconstant database

A cdb contains a data set as key/value pairs, and multiple values can be associated with the same key. In such case, multiple queries should be done to retrieve all the values for a given key.

Because of how records are stored, the database size MUST be kept under 4 gigabytes.

cdb are created from encoded records, one per line. The end of the data set is marked with an extra newline.

A record is encoded as +klen,dlen:key->data

and are plaintext strings. is the number of bytes in key, while is the number of bytes in data.

Encoded record format, suitable for creating a new cdb

+3,5:one->Hello
+3,7:two->Goodbye

cdb(1), http://cr.yp.to/cdb/cdbmake.html

Willy Goiffon <dev@z3bra.org>

2022-08-31 POSIX.1-2008