Next: Introduction, Previous: (dir), Up: (dir) [Contents][Index]
This is the zcdb Reference Manual, version 1.0.4, generated automatically by Declt version 4.0 beta 2 "William Riker" on Mon Aug 15 06:13:31 2022 GMT+0.
Next: Systems, Previous: The zcdb Reference Manual, Up: The zcdb Reference Manual [Contents][Index]
The ZCDB project is for reading and writing cdb files from Common Lisp. It is available under a BSD-like license. See the file LICENSE.txt for details. For full documentation, see http://www.xach.com/lisp/zcdb/ or the doc/index.html file in this archive.
Next: Files, Previous: Introduction, Up: The zcdb Reference Manual [Contents][Index]
The main system appears first, followed by any subsystem dependency.
Read and write cdb files, as specified in http://cr.yp.to/cdb.html
Zach Beane <xach@xach.com>
MIT
1.0.4
Next: Packages, Previous: Systems, Up: The zcdb Reference Manual [Contents][Index]
Files are sorted by type and then listed depth-first from the systems components trees.
Next: zcdb/reading.lisp, Previous: zcdb/package.lisp, Up: Lisp [Contents][Index]
package.lisp (file).
zcdb (system).
Next: zcdb/writing.lisp, Previous: zcdb/cdb.lisp, Up: Lisp [Contents][Index]
cdb.lisp (file).
zcdb (system).
Previous: zcdb/reading.lisp, Up: Lisp [Contents][Index]
reading.lisp (file).
zcdb (system).
Next: Definitions, Previous: Files, Up: The zcdb Reference Manual [Contents][Index]
Packages are listed by definition order.
common-lisp.
Next: Indexes, Previous: Packages, Up: The zcdb Reference Manual [Contents][Index]
Definitions are sorted by export status, category, package, and then by lexicographic order.
Next: Internals, Previous: Definitions, Up: Definitions [Contents][Index]
Next: Ordinary functions, Previous: Public Interface, Up: Public Interface [Contents][Index]
Evaluate BODY with CDB bound to a CDB-WRITER object. The CDB in progress is written to TEMP-FILE, and then when the CDB is successfully written, TEMP-FILE is renamed to FILE. For atomic operation, FILE and TEMP-FILE must be on the same filesystem.
zcdb.
Next: Standalone methods, Previous: Macros, Up: Public Interface [Contents][Index]
Add KEY and VALUE to a cdb file. KEY and VALUE should both be (unsigned-byte 8) vectors.
zcdb.
Previous: Ordinary functions, Up: Public Interface [Contents][Index]
Previous: Public Interface, Up: Definitions [Contents][Index]
Next: Ordinary functions, Previous: Constants, Up: Internals [Contents][Index]
Next: Generic functions, Previous: Special variables, Up: Internals [Contents][Index]
Create a hash vector for a bucket. A hash vector has 2x the entries of the bucket, and is initialized to an empty record pointer. The high 24 bits of the hash value of a record pointer, mod the size of the vector, is used as a starting slot, and the vector is walked (wrapping at the end) to find the first free slot for positioning each record pointer entry.
zcdb.
Call FUN with one argument, a CDB-WRITER instance to which records can be added with ADD-RECORD.
zcdb.
Write the trailing hash tables and leading table pointers to the cdb file.
zcdb.
zcdb.
Write BUCKET’s hash table vector to STREAM.
zcdb.
Write an (unsigned-byte 32) value to STREAM in little-endian order.
zcdb.
Write the traililng hash tables to the end of the cdb file. Initializes the position of the buckets in the process.
zcdb.
Write the leading hash table pointers to the beginning of the cdb file. Must be called after WRITE-HASH-TABLES, or the positions won’t be available.
zcdb.
Next: Classes, Previous: Ordinary functions, Up: Internals [Contents][Index]
zcdb.
automatically generated reader method
zcdb.
automatically generated writer method
zcdb.
automatically generated reader method
zcdb.
automatically generated writer method
zcdb.
A vector of record-pointers.
zcdb.
zcdb.
The hash value of the record key.
zcdb.
automatically generated reader method
zcdb.
automatically generated writer method
zcdb.
The file position at which the record is stored.
zcdb.
zcdb.
The file position at which this table is (eventually) slotted.
Previous: Generic functions, Up: Internals [Contents][Index]
zcdb.
Initarg | Value |
---|---|
:end-of-records-position | 2048 |
:buckets | (map-into (make-array 256) (lambda nil (make-instance (quote hash-table-bucket)))) |
:buckets
:end-of-records-position
:output
During construction of the CDB, record pointers are
accumulated into one of 256 hash table buckets, depending on the low
8 bits of the hash value of the key. At the end of record writing,
these buckets are used to write out hash table vectors at the end of
the file, and write pointers to the hash table vectors at the start
of the file.
zcdb.
Initarg | Value |
---|---|
:table-position | 0 |
:entries | (make-growable-vector) |
The file position at which this table is (eventually) slotted.
:table-position
A vector of record-pointers.
:entries
Every key/value record written to a CDB has a
corresponding record pointer, which tracks the key’s hash value and
the record’s position in the data file. When all records have been
written to the file, these record pointers are organized into hash
tables at the end of the cdb file.
zcdb.
Initarg | Value |
---|---|
:hash-value | 0 |
:record-position | 0 |
The hash value of the record key.
:hash-value
The file position at which the record is stored.
:record-position
Previous: Definitions, Up: The zcdb Reference Manual [Contents][Index]
Jump to: | (
A B C E F G H L M O P R S T W |
---|
Jump to: | (
A B C E F G H L M O P R S T W |
---|
Next: Data types, Previous: Functions, Up: Indexes [Contents][Index]
Jump to: | *
+
B C E H O R S T |
---|
Jump to: | *
+
B C E H O R S T |
---|
Jump to: | C F H P R S W Z |
---|
Jump to: | C F H P R S W Z |
---|