pub fn guess_vec(bytes: Vec<u8>) -> Result<FormatId>Expand description
Guesses the authoritative format for raw bytes.
ยงExamples
use ctb_formats_detection::{guess_vec, FormatId};
let gz_bytes = vec![0x1F, 0x8B, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00];
let format = guess_vec(gz_bytes)?;
assert_eq!(format, FormatId::Gzip);