Skip to main content

Practice ยท 1 of 2

Byte-Exact Save

Implement kv_save: write the documented layout with explicit byte stores โ€” magic, version, count (LE), all 16 slots (key NUL-padded, value i64 LE, live byte), then the checksum. The file must be exactly 669 bytes for KV_CAP 16.

Difficulty: intermediate

Back to lesson: Practice: Persistence & the Hostile File