Skip to main content

MAX_BACKUP_BYTES

Constant MAX_BACKUP_BYTES 

Source
const MAX_BACKUP_BYTES: u64 = _; // 67_108_864u64
Expand description

Hard cap on the on-disk size of a bundle file we’ll deserialize. Realistic worst case: ~300 B per logged event × ~50 events/day × a decade ≈ 55 MB. 64 MiB gives a generous multiple of that while keeping the peak allocation (read into String, then parse) low enough not to stress a 4 GB tray-app footprint. Larger files short-circuit before parse so an accidentally-picked 10 GiB blob can’t OOM the deserializer.