Function detect_file_format

Source
pub fn detect_file_format<R: Read + Seek>(reader: R) -> Result<FileFormat>
Expand description

Detect file format using magic bytes (primary) with extension fallback

Reads the first few bytes of the file to identify format by magic signature. This is more reliable than extension-based detection.