pub fn is_archive(buf: &[u8]) -> bool
Determines whether a buffer is an archive type.
use std::fs; assert!(infer::is_archive(&fs::read("testdata/sample.pdf").unwrap()));