diff --git a/examples/file_info.rs b/examples/file_info.rs index f9186251..63f7d87e 100644 --- a/examples/file_info.rs +++ b/examples/file_info.rs @@ -1,6 +1,7 @@ extern crate zip; use std::fs; +use std::io::BufReader; fn main() { std::process::exit(real_main()); @@ -14,8 +15,9 @@ fn real_main() -> i32 { } let fname = std::path::Path::new(&*args[1]); let file = fs::File::open(&fname).unwrap(); + let reader = BufReader::new(file); - let mut archive = zip::ZipArchive::new(file).unwrap(); + let mut archive = zip::ZipArchive::new(reader).unwrap(); for i in 0..archive.len() { let file = archive.by_index(i).unwrap();