Thread overview |
---|
April 13, 2015 cdb reader and creator | ||||
---|---|---|---|---|
| ||||
Attachments: | here is Cdb[1] reader and creator, in two small modules. reader: [2] creator: [3] sample: [4] it's totally untested, but i believe that is works. at least for the given sample. Public Domain, based on tinycdb[5]. [1] http://cr.yp.to/cdb.html [2] http://repo.or.cz/w/iv.d.git/blob_plain/HEAD:/tinycdb.d [3] http://repo.or.cz/w/iv.d.git/blob_plain/HEAD:/tinycdbmk.d [4] http://repo.or.cz/w/iv.d.git/blob_plain/HEAD:/tinycdb_test/cdbtest.d [5] http://www.corpit.ru/mjt/tinycdb.html |
April 14, 2015 Re: cdb reader and creator | ||||
---|---|---|---|---|
| ||||
Posted in reply to ketmar | On Monday, 13 April 2015 at 21:34:36 UTC, ketmar wrote:
> here is Cdb[1] reader and creator, in two small modules.
>
> reader: [2]
> creator: [3]
> sample: [4]
>
> it's totally untested, but i believe that is works. at least for the
> given sample.
>
> Public Domain, based on tinycdb[5].
>
> [1] http://cr.yp.to/cdb.html
> [2] http://repo.or.cz/w/iv.d.git/blob_plain/HEAD:/tinycdb.d
> [3] http://repo.or.cz/w/iv.d.git/blob_plain/HEAD:/tinycdbmk.d
> [4] http://repo.or.cz/w/iv.d.git/blob_plain/HEAD:/tinycdb_test/cdbtest.d
> [5] http://www.corpit.ru/mjt/tinycdb.html
Hi, i'd have a technical question about cdb, maybe a bit off-topic...
Why it was designed to use 256 hashtables ?
Why not single bigger 252 * 256 hashtable ?
Is it only to save space or there are some other reason ?
|
April 14, 2015 Re: cdb reader and creator | ||||
---|---|---|---|---|
| ||||
Posted in reply to Baz Attachments: | On Tue, 14 Apr 2015 11:50:24 +0000, Baz wrote:
> Hi, i'd have a technical question about cdb, maybe a bit off-topic...
>
> Why it was designed to use 256 hashtables ?
> Why not single bigger 252 * 256 hashtable ?
>
> Is it only to save space or there are some other reason ?
i honestly don't know. but i bet DJB knows. ;-)
my goal was to simply create cdb-compatible code, so i can work with cdb databases without resorting to C library.
|
Copyright © 1999-2021 by the D Language Foundation