tAdd manpage for the cdb(5) format - cdb - Constant database manipulation utility
(HTM) git clone git://git.z3bra.org/cdb.git
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
---
(DIR) commit e1c34a3022da8c5b8ba11fdf3a99de08d433da2f
(DIR) parent 80b018bc5af6f06e344934ce82ee8cdf7584407a
(HTM) Author: Willy Goiffon <dev@z3bra.org>
Date: Wed, 31 Aug 2022 22:46:13 +0200
Add manpage for the cdb(5) format
Diffstat:
A cdb.5 | 43 ++++++++++++++++++++++++++++++
M mkfile | 4 ++++
2 files changed, 47 insertions(+), 0 deletions(-)
---
(DIR) diff --git a/cdb.5 b/cdb.5
t@@ -0,0 +1,43 @@
+.Dd 2022-08-31
+.Dt CDB 5
+.Os POSIX.1-2008
+.Sh NAME
+.Nm cdb
+.Nd constant database
+.Sh DESCRIPTION
+A
+.Nm
+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.
+.Pp
+Because of how records are stored, the database size MUST be kept under
+4 gigabytes.
+.Ss ENCODED RECORD
+.Nm
+are created from encoded records, one per line. The end of the data set
+is marked with an extra newline.
+.Pp
+A record is encoded as
+.Li +klen,dlen:key->data
+.Pp
+.Em key
+and
+.Em data
+are plaintext strings.
+.Em klen
+is the number of bytes in key, while
+.Em dlen
+is the number of bytes in data.
+.Sh EXAMPLE
+Encoded record format, suitable for creating a new
+.Nm
+.Bd -literal
++3,5:one->Hello
++3,7:two->Goodbye
+.Ed
+.Sh SEE ALSO
+.Xr cdb 1 ,
+.Xr http://cr.yp.to/cdb/cdbmake.html
+.Sh AUTHORS
+.An Willy Goiffon Aq Mt dev@z3bra.org
(DIR) diff --git a/mkfile b/mkfile
t@@ -15,7 +15,11 @@ install:V: cdb
mkdir -p ${DESTDIR}${MANDIR}/man1
cp cdb.1 ${DESTDIR}${MANDIR}/man1/cdb.1
chmod 644 ${DESTDIR}${MANDIR}/man1/cdb.1
+ mkdir -p ${DESTDIR}${MANDIR}/man5
+ cp cdb.5 ${DESTDIR}${MANDIR}/man5/cdb.5
+ chmod 644 ${DESTDIR}${MANDIR}/man5/cdb.5
uninstall:V:
rm ${DESTDIR}${PREFIX}/bin/cdb
rm ${DESTDIR}${MANDIR}/man1/cdb.1
+ rm ${DESTDIR}${MANDIR}/man5/cdb.5