pub fn from_file(file_name: &str) -> Result<Self> {
        let mut file = Self {
            data: Default::default(),
            ptr: crate::lautil::create_laszip(),
            is_open: false,
        };
        let mut is_compressed = 0;
        file.handle_error(unsafe {
            let cfile_name = std::ffi::CString::new(file_name).unwrap();
            laszip_sys::laszip_open_reader(file.ptr, cfile_name.as_ptr(), &mut is_compressed)
        })?;

        file.is_open = true;

        Ok(file)
    }
/// Creates a reader from a file
Creates a reader from a file
Creates a reader from a file
pub fn from_file(file_name: &str) -> Result<Self> {
        let mut file = Self {
            data: Default::default(),
            ptr: crate::lautil::create_laszip(),
            is_open: false,
        };
        let mut is_compressed = 0;
        file.handle_error(unsafe {
            let cfile_name = std::ffi::CString::new(file_name).unwrap();
            laszip_sys::laszip_open_reader(file.ptr, cfile_name.as_ptr(), &mut is_compressed)
        })?;
        file.is_open = true;
        Ok(file)
    }
pub fn from_file ( file_name : & str ) -> Result < Self > { let mut file = Self { data : Default :: default ( ) , ptr : crate :: lautil :: create_laszip ( ) , is_open : false , } ; let mut is_compressed = 0 ; file . handle_error ( unsafe { let cfile_name = std :: ffi :: CString :: new ( file_name ) . unwrap ( ) ; laszip_sys :: laszip_open_reader ( file . ptr , cfile_name . as_ptr ( ) , & mut is_compressed ) } ) ? ; file . is_open = true ; Ok ( file ) }
Creates a reader from a file
Creates a reader from a file
file_name
&str