pub fn is(buf: &[u8], extension: &str) -> bool
Determines whether a buffer is of given extension.
let buf = [0xFF, 0xD8, 0xFF, 0xAA]; assert!(infer::is(&buf, "jpg"));