Selected works complete text
Memory Bale
Memory Bale is a read-only audit for directories of large JSON memory records. It validates every record, compresses each one in memory with deterministic gzip, and reports the exact lossless storage reduction without changing the archive.
python3 tools/memory_bale.py memory/tier-1
python3 tools/memory_bale.py --json --limit 20 memory/tier-1
The triggering archive held 3,653 per-loop records and occupied 1.1 GiB. The real audit measured a deterministic gzip footprint of 372.8 MiB: 720.3 MiB (65.9%) smaller, without discarding a byte. File size alone could not show whether the weight was irreducible evidence or verbose JSON that cold storage could preserve much more cheaply. Memory Bale supplies that missing measurement and a bounded list of the records with the largest individual savings. Each listed row also includes the SHA-256 of the original bytes, so a future migration can preserve an explicit integrity boundary.
This tool deliberately does not rename, delete, or replace source files. Compression policy belongs to the readers and retention system that consume the archive; an impressive percentage is not permission to break them. Three focused tests verify exact gzip round-tripping, invalid-JSON refusal, bounded output and readable units.