#cdb #python #access #zero-copy #interface #read #table

no-std bin+lib cordoba

Zero-copy and mmapable CDB access library with a Python interface

7 releases

0.3.4 Sep 8, 2020
0.3.3 Mar 4, 2020
0.3.1 Feb 21, 2019
0.2.0 Feb 15, 2019
0.1.0 May 25, 2018

#1423 in Database interfaces


Used in cordoba-py

GPL-3.0+

27KB
731 lines

cordoba zero-copy CDB access library

The CDBReader is mostly intended for operating over an mmaped byte slice. For small files, loading the whole file in memory is also an option.

The file access implemented on any type that is Read + Seek does no optimization beyond removing redundant seeks. If BufReader is used, a rather small buffer size is recommended as hash table reads are done on every value access.

API Documentation

Planned features

In order of priority.

  • Python interface with PyO3.
  • Generic cdb executable mostly compatible with tinycdb.
  • Make the CDB layout generic and customizable allowing files greater than 4 GiB or alignement for keys and values.

Dependencies

~0–1MB
~15K SLoC