Getǣl — Read-only macOS home directory disk usage cartography & APFS telemetry service

Encode directory histograms as sparse LEB128 BLOBs with leaf deduplication #7

Merged zip.mu.social
targeting dev from fix/histogram-blobs
Merged opened by and assigned to zip.mu.social
targeting dev from fix/histogram-blobs

Resolves #3.

  • Added compact sparse (bucket_idx, LEB128) binary BLOB encoding (to_blob / from_blob, returning None for all-zero histograms) on CategoryHistogram and AgeHistogram in src/domain/mod.rs.
  • Replaced the 8 verbose *_json columns in directories with *_blob BLOB columns in src/cache/mod.rs and bumped SCHEMA_VERSION to "2" (automatically dropping/recreating legacy v1 cache tables on open).
  • Deduplicated leaf directories (direct_dir_count == 0) by storing NULL for subtree_* histogram columns and falling back to direct_* on read.
  • Added round-trip unit tests covering zero, sparse, dense, and u64::MAX values.

Verified: cargo fmt --check, cargo clippy --all-targets --all-features -- -D warnings, and cargo test (30 unit + 2 e2e) all pass.

Commits 0