Skip to main content

sniff

Function sniff 

Source
pub fn sniff<R: Read + Seek>(reader: &mut R) -> Result<ContainerFormat>
Expand description

Sniff the container format of a seekable image: read its header and trailing footer, classify via detect, and rewind the reader to 0 for the caller. A sub-512-byte image is read without a footer.

§Errors

Propagates any I/O error from seeking/reading the image.