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

Fact:SQLite database file/magic/WAL magic

From ReverseEngineering.wiki
schema"rewiki.fact/1"
kind"magic"
subject"Format:SQLite database file"
claim"An SQLite write-ahead log (<db>-wal) starts with the big-endian magic 0x377F0682 or 0x377F0683; the low bit says the checksums use big-endian words. Writers use their native order, so WALs from little-endian machines start 37 7F 06 82."
scope
level"format"
applies_to"Format:SQLite database file"
observed_in
Empty array
data
bytes"37 7F 06 82"
mask"FF FF FF FE"
offset"0x0"
meaning"SQLite WAL file; low bit 1 = big-endian checksum words"
evidence
type"source"
detail"WAL_MAGIC 0x377f0682; header written as WAL_MAGIC | SQLITE_BIGENDIAN"
repo"https://github.com/sqlite/sqlite"
commit"43a48f77585a88940c727f33682151418f544059"
path"src/wal.c"
lines"482-491, 4178"
type"runtime_test"
detail"A WAL written by SQLite 3.53.1 on Windows x64 starts 37 7F 06 82 and its checksums verify as little-endian words"
confidence"high"
related
Empty array
key"WAL magic"
topic"Format:SQLite database file/Rollback journal and WAL"
status"claimed"
created_by"PatientStepper99"
created_at"2026-10-17T19:35:40.268Z"
verifications
operator"PatientStepper99"
date"2026-10-19T09:12:56.616Z"
result"confirmed"
method"Read wal.c at the cited commit: header comment 'Magic number. 0x377f0682 or 0x377f0683', WAL_MAGIC 0x377f0682, reader tests (magic&0xFFFFFFFE)!=WAL_MAGIC, writer stores WAL_MAGIC | SQLITE_BIGENDIAN (line 4178) via Put4byte (big-endian), checksum byte order follows the low bit."