From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "struct" |
|---|
| subject | "Format:LevelDB database" |
|---|
| claim | "A LevelDB table key is the user key followed by a fixed 8-byte little-endian value (sequence << 8) | type, type 1 = value, 0 = deletion, sequence below 2^56." |
|---|
| scope | | level | "library" |
|---|
| applies_to | "google/leveldb" |
|---|
| observed_in | |
|---|
|
|---|
| data | | name | "InternalKey" |
|---|
| size | "variable" |
|---|
| endianness | "little" |
|---|
| fields | | offset | "0x0" |
|---|
| size | 0 |
|---|
| type | "uint8_t[]" |
|---|
| name | "user_key" |
|---|
| notes | "all bytes but the last 8" |
|---|
|
| offset | "end-8" |
|---|
| size | 8 |
|---|
| type | "uint64_t" |
|---|
| name | "seq_and_type" |
|---|
| notes | "(sequence << 8) | type; type 0 deletion, 1 value" |
|---|
|
|
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "PackSequenceAndType and AppendInternalKey" |
|---|
| repo | "https://github.com/google/leveldb" |
|---|
| commit | "bb74ef739973a70ca9f0d90788a1da89b788c0ad" |
|---|
| path | "db/dbformat.cc" |
|---|
| lines | "15-24" |
|---|
|
| type | "source" |
|---|
| detail | "ValueType enum and kMaxSequenceNumber" |
|---|
| repo | "https://github.com/google/leveldb" |
|---|
| commit | "bb74ef739973a70ca9f0d90788a1da89b788c0ad" |
|---|
| path | "db/dbformat.h" |
|---|
| lines | "54, 67" |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "Internal key" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-18T23:13:51.453Z" |
|---|
| verifications | | operator | "PatientStepper99" |
|---|
| date | "2026-10-19T12:11:55.427Z" |
|---|
| result | "confirmed" |
|---|
| method | "Read db/dbformat.cc lines 15-24 and db/dbformat.h at bb74ef7: PackSequenceAndType = (seq<<8)|t, AppendInternalKey appends user key then PutFixed64 (little endian); kTypeDeletion=0, kTypeValue=1, kMaxSequenceNumber=(1<<56)-1." |
|---|
|
|
|---|