fn from_ggb(mut file: File) -> GgbResult<Self> {
        use std::io::Read;

        if let Ok(xml) = String::from_utf8(
            zip::read::ZipArchive::new(&mut file)?
                .by_name("geogebra.xml")?
                .bytes()
                .map(|b| b.unwrap_or(0))
                .collect(),
        ) {
            ggb::parse_xml(&xml)
        } else {
            Err(GgbError::InvalidGgb)
        }
    }
/// Attempts to read a GGB file. If succesful, outputs a polytope in at most
/// 3D.
Attempts to read a GGB file. If succesful, outputs a polytope in at most
3D.
Attempts to read a GGB file . If succesful outputs a polytope in at most 3D .
fn from_ggb(mut file: File) -> GgbResult<Self> {
        use std::io::Read;
        if let Ok(xml) = String::from_utf8(
            zip::read::ZipArchive::new(&mut file)?
                .by_name("geogebra.xml")?
                .bytes()
                .map(|b| b.unwrap_or(0))
                .collect(),
        ) {
            ggb::parse_xml(&xml)
        } else {
            Err(GgbError::InvalidGgb)
        }
    }
fn from_ggb ( mut file : File ) -> GgbResult < Self > { use std :: io :: Read ; if let Ok ( xml ) = String :: from_utf8 ( zip :: read :: ZipArchive :: new ( & mut file ) ? . by_name ( " " ) ? . bytes ( ) . map ( | b | b . unwrap_or ( 0 ) ) . collect ( ) , ) { ggb :: parse_xml ( & xml ) } else { Err ( GgbError :: InvalidGgb ) } }
Attempts to read a GGB file.
Attempts to read a GGB file .
file
File
file
File