cdb reader and creator

2015-04-13 Thread ketmar via Digitalmars-d-announce
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


signature.asc
Description: PGP signature


Re: cdb reader and creator

2015-04-14 Thread Baz via Digitalmars-d-announce

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 ?


Re: cdb reader and creator

2015-04-14 Thread ketmar via Digitalmars-d-announce
On Tue, 14 Apr 2015 11:50:24 +, 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.

signature.asc
Description: PGP signature