pub fn from_file(filename: &PathBuf) -> BinaryReader {
    let mut file = File::open(filename).unwrap();
    let mut buf: Vec<u8> = Vec::new();
    file.read_to_end(&mut buf).unwrap();
    BinaryReader { buf, pos: 0 }
  }
/// Open a binary file and read everything into buf.
Open a binary file and read everything into buf.
Open a binary file and read everything into buf .
pub fn from_file(filename: &PathBuf) -> BinaryReader {
    let mut file = File::open(filename).unwrap();
    let mut buf: Vec<u8> = Vec::new();
    file.read_to_end(&mut buf).unwrap();
    BinaryReader { buf, pos: 0 }
  }
pub fn from_file ( filename : & PathBuf ) -> BinaryReader { let mut file = File :: open ( filename ) . unwrap ( ) ; let mut buf : Vec < u8 > = Vec :: new ( ) ; file . read_to_end ( & mut buf ) . unwrap ( ) ; BinaryReader { buf , pos : 0 } }
Open a binary file and read everything into buf.
Open a binary file and read everything into buf .
filename
&PathBuf