About this project

LevelDB is an embedded key-value storage library developed at Google by Sanjay Ghemawat and Jeff Dean. It provides an ordered mapping from string keys to string values and is intended to be linked directly into an application rather than run as a separate service. Key capabilities described in the README: - Keys and values are arbitrary byte arrays, and data is stored sorted by key. - Callers may supply a custom comparison function to override the default sort order. - Core operations are Put(key,value), Get(key) and Delete(key). - Multiple changes can be applied in one atomic batch. - Users can create a transient snapshot for a consistent view of the data. - Forward and backward iteration over the data is supported. - Data is automatically compressed with Snappy, with Zstd also supported. - External activity such as file system operations is relayed through a virtual interface so OS interactions can be customized. Important limitations stated by the project: it is not a SQL database, has no relational model, SQL queries or index support; only a single process (possibly multi-threaded) can access a database at a time; and there is no built-in client-server support, so applications needing that must wrap their own server around the library. The repository is under very limited maintenance. The maintainers say they will only review fixes for critical bugs such as data loss or memory corruption, and changes absolutely needed by internally supported LevelDB clients, typically to fix breakage from language, standard library or OS updates. Contributions are expected to target tested platforms (POSIX for Linux and macOS, or Windows), preserve a stable API, include tests, and follow the Google C++ Style Guide; build configuration changes are unlikely to be accepted. Pull requests require signing a Google Contributor License Agreement and squashing/rebase onto main. Building uses CMake out of the box. On POSIX, a typical quick start is creating a build directory, running cmake with a Release build type, and then building. On Windows, CMake can generate Visual Studio 2017 project/solution files, with an option for 64-bit targets, and the solution can be built from the command line or inside Visual Studio. The README includes a performance report from the bundled db_bench program using a database of one million entries with 16-byte keys and 100-byte values. It reports write benchmarks (fillseq, fillsync, fillrandom, overwrite) and read benchmarks (readrandom, readseq, readreverse), noting that results are noisy and that background compaction improves read performance. The public interface lives in include/leveldb/*.h, with db.h as the main entry point, options.h for database and per-operation behavior, comparator.h for custom ordering, iterator.h for iteration, write_batch.h for atomic updates, slice.h and status.h as helpers, env.h for OS abstraction, and table.h/table_builder.h as lower-level modules most clients will not use directly. Documentation is bundled in the source tree under doc/.