Daniel J. Bernstein, an esteemed expert in cryptography and secure software development, who has created projects such as qmail, djbdns, NaCl, Ed25519, Curve25519, and ChaCha20-Poly1305, has released version 20250121 of the cdb project, which offers a data storage format and an accompanying library for embedding database functions in applications in the form of key/value pairs. This release comes over 25 years after the previous update of cdb 0.75, which was formed in February 2000.
The new version implements the cdb64 format, transitioned to structures with 64-bit types. On 64-bit platforms, the new format allows the creation of databases up to one exabyte (previously, database size could not exceed 4 GB). The database is very compact, using a 4096-byte header and 48 bytes of metadata for each entry (for the 32-bit version, the header is 2048 bytes and 24 bytes per entry). Access to the database involves only two disk access operations when a key is present and one when it's absent. Atomic database replacement is supported, resilient to crashes and does not block read access.
Other changes:
- Support for building using the configure script and installation with the command 'make install'.
- The binding of test scripts to csh has been removed.
- All internal integer values have been replaced with the 'num' type, defined as 'long long'. The uint32, fmt, and scan functions have been replaced with functions that work with the num type.
- The buffer interface has been split into inbuf and outbuf. The hier interface has been cleaned up.
- Unused function definitions have been removed from the code.
- The use of wrappers such as str_len, alloc, uint32, exit, error, and systype has been discontinued.
- The code has been reworked to eliminate deprecated C constructs such as old-style function definitions, empty prototypes, and old-style main() definitions.
- Definitions of const and static have been implemented.
- The '-Wall' flag has been activated during compilation and the code has been cleaned up to eliminate warnings.
- The compilation includes options -fwrapv, -fno-delete-null-pointer-checks, -fno-strict-aliasing, and -fno-strict-overflow.
Kilde: opennet.ru
