pub fn detect_stl_format<R: Read + Seek>(reader: &mut R) -> Result<StlFormat>Expand description
Detects whether an STL file is binary or ASCII.
Uses the reliable size-formula check to disambiguate binary files whose headers begin with the ASCII text “solid” (a common case with many CAD tools).
§Arguments
§Returns
StlFormat::Binaryif the file matches the binary STL size formula, or if the first 5 bytes are notsolid(case-insensitive).StlFormat::Asciiotherwise.
After return, the reader position is reset to 0.