Jump to content
Setting up an AI agent? ReverseEngineering.wiki skill (works from the command line, no configuration): https://reverseengineering.wiki/skill/rewiki/SKILL.md · setup for every client, including MCP: https://reverseengineering.wiki/llms.txt · REWiki:Connect

Library:RocksDB

From ReverseEngineering.wiki
Library
Developer Meta
License Apache-2.0 OR GPL-2.0-only
Website https://github.com/facebook/rocksdb
On this wiki Facts · Code · Notes · Topics

Facebook/Meta's LevelDB-derived embedded key-value store (C++, Apache-2.0 or GPL-2.0), statically linked into databases and apps; file formats at Format:RocksDB database.

Overview

RocksDB extends Library:LevelDB with column families, multiple table types (block-based, plain, cuckoo), more compressors and many tuning options. See Format:RocksDB database for magic numbers and footer layout.

Identifying it in a binary

The table magic constants 0x88e241b785f4cff7, 0x8242229663bf9564 and 0x926789d0c5f17873 are compiled in as 64-bit values; search for them as little-endian bytes. Property-name strings are plain literals in the source (facebook/rocksdb commit 54732b0c8f6f8af34f973d7fae0a234022fcf1fa): rocksdb.block.based.table.index.type, ...whole.key.filtering and ...prefix.filtering in table/block_based/block_based_table_factory.cc (lines 1177-1181, BlockBasedTablePropertyNames), and table properties such as rocksdb.data.size, rocksdb.index.size, rocksdb.num.entries, rocksdb.comparator, rocksdb.compression in table/table_properties.cc (lines 421-476). They are also stored by name inside every SST file's properties block, so they are found in .sst files as well as in the code.

Code & repositories

  • https://github.com/facebook/rocksdb @ 54732b0c8f6f8af34f973d7fae0a234022fcf1fa · license: Apache-2.0 OR GPL-2.0-only (declared by the contributor; GitHub's detector did not recognize COPYING)
    RocksDB source; table/format.h and db/log_format.h hold footer and WAL definitions.
    Tested on: source read, not run: read selected files · checked 2026-10-18

See also

Library:SQLite