An implementation of cdb written in erlang. The binary format is compatible with D. J. Bernstein cdb as well as tinycdb.
$ rebar3 compile
A = cdb:make_start("foo.cdb"),
B = cdb:make_add(A, <<199919:64>>, <<"ccc">>),
C = cdb:make_add(B, <<"aa">>, <<"bbb">>),
ok = cdb:make_finish(C),
?assertEqual({<<199919:64>>, <<"ccc">>}, cdb:find("foo.cdb", <<199919:64>>)),
?assertEqual({<<"aa">>, <<"bbb">>}, cdb:find("foo.cdb", <<"aa">>)).
A = cdb:make_start("foo.cdb"),
B = cdb:make_add(A, <<"aa">>, <<"bbb">>),
ok = cdb:make_finish(B),
?assertEqual({<<"aa">>, <<"bbb">>}, cdb:find("foo.cdb", <<"aa">>)).