Skip to main content

verify_packed_objects

Function verify_packed_objects 

Source
pub fn verify_packed_objects<P: AsRef<Path>>(
    manifest_path: P,
) -> Result<Vec<String>>
Expand description

Verify the on-disk integrity of a packed dataset against its manifest.

Because packs and the directory are content-addressed, integrity is a property anyone can check with no trusted side-channel: each object’s bytes must blake3-hash to the name the manifest gave it, and its on-disk length must match the declared length. Additionally the directory must decode and reference no pack_id outside the manifest’s pack table.

Returns the list of violations (empty ⇒ clean). Returns Err only when the manifest itself cannot be read or parsed (a missing referenced object is a reported violation, not an Err, so a full report is produced in one pass).