LevelDB is a fast embedded library that maps string keys to string values in sorted order. Applications link it in-process; it is not a SQL database and has no built-in client-server layer.
Overview
LevelDB provides an ordered key-value store where keys and values are arbitrary byte arrays. Data is kept sorted by key, and callers may supply a custom comparator to override the default bytewise ordering. Core operations include Put, Get, and Delete, with support for atomic batches, snapshots for consistent reads, and forward and backward iteration.
The library compresses stored data with Snappy by default and also supports Zstd. External operating-system interactions go through a virtual interface so deployments can customize file-system behavior. Documentation ships with the source and is available online.
LevelDB is not relational: it has no SQL, indexes, or multi-process access to one database file. Only a single process (possibly multithreaded) may open a given database at a time. Applications that need remote access must wrap their own server around the library.
The project supports CMake builds on POSIX platforms and Windows, with maintained public headers under include/leveldb for the main DB interface, options, iterators, batches, and related types.
Key features
- Sorted byte-key storage
- Custom key comparators
- Atomic write batches
- Consistent snapshots
- Forward and backward iterators
- Snappy and Zstd compression
- Pluggable environment interface
- CMake build support
Use cases
- Embedded local persistence
- Sorted key iteration workloads
- Single-process application storage
- Custom storage backends via Env API