Introduction
LevelDB is Google’s key and value
storage library. A database is a directory of files, and the data that has settled is
kept in sorted table files. They are named .ldb; the extension
.sst, used before LevelDB 1.14, is still read. Recent writes are in the
log files beside them.
Structure
1Data blocks sorted key and value pairsvariable2Meta blocks auxiliary data such as a filtervariable3Metaindex block where the meta blocks arevariable4Index block one entry for each data blockvariableendFooter handles of the metaindex and index blocks, padding and the magic number0xdb4775248b80fb57, little-endian48 bytes
Not described
This page is a first outline. The details of the layout are not yet described here.
Known, not yet covered
- Reference: block entries and restart points, block compression and checksums, the internal keys and the table variants of other projects.
- Viewer: the site has no viewer for this format.
Links
Developers
- LevelDB – Google’s library (C++)
Reference
- Table format – LevelDB documentation
- Implementation notes – the files of a database