Skip to main content

Module identify

Module identify 

Source
Expand description

The orchestration engine: identify → dispatch → score → recursively unwrap.

Every detector here is a thin dispatcher over a mature crate (plist, flate2, snap, base64, hex, uuid, serde_json) — this module owns only the identification, scoring, and recursive unwrap, never the codec itself. All input is attacker-controllable, so the invariant is: no panic, no OOM (every decompression is size-capped and the recursion is depth-capped), and every failure degrades to a lower-confidence or absent reading.

Functions§

identify
Identify a blob with default Limits. Returns scored candidates, best (highest Confidence) first. Always returns at least one candidate (an BlobKind::Unknown reading that surfaces the raw head bytes when nothing else matched).
identify_with_limits
Identify a blob with explicit resource Limits and a starting recursion depth — the entry point the recursive unwrap calls into.