pub fn pack_path_kind(path: &str) -> Option<PackFileKind>Expand description
True when path is pack-<oid hex>.<ext>, the name git itself gives the
files in objects/pack, and the name gunnar seals them under.
The name matters, and this is why it is checked rather than ignored. znippy resolves “is this already compressed?” by extension first and by a magic probe only as a fallback, and the probe reads offset 0 of every chunk while a container’s magic sits at offset 0 of chunk 0 alone. Storing a pack under a name with no extension therefore costs a full codec pass over all but the first chunk — measured at 35.6 s of CPU and 2.6 GB of RSS on 200 MB, against 0.09 s and 184 MB once the name carried the extension. A pack-tier archive keeps git’s own file names for exactly that reason.