aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Schadt <kingdread@gmx.de>2019-02-16 02:29:27 +0100
committerDaniel Schadt <kingdread@gmx.de>2019-02-16 02:29:27 +0100
commit0ac0c8d6c7cdb0bef6576a034c52351e7899dff8 (patch)
treeb20d4d6c55cbbdf5665b36d0c477b322e81d35c3
parent91a0a0b48abf3bf8019c7b5419557883ac9cae57 (diff)
downloadevtclib-0ac0c8d6c7cdb0bef6576a034c52351e7899dff8.tar.gz
evtclib-0ac0c8d6c7cdb0bef6576a034c52351e7899dff8.tar.bz2
evtclib-0ac0c8d6c7cdb0bef6576a034c52351e7899dff8.zip
wrap zip reading in BufReader
-rw-r--r--src/raw/mod.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/raw/mod.rs b/src/raw/mod.rs
index 7a079a1..7451b5a 100644
--- a/src/raw/mod.rs
+++ b/src/raw/mod.rs
@@ -17,11 +17,11 @@ pub mod parser;
pub use self::parser::{parse_file, Evtc, ParseError, ParseResult};
-use std::io::{Read, Seek};
+use std::io::{Read, Seek, BufReader};
/// Parse a complete log that was compressed as a zip file.
pub fn parse_zip<T: Read + Seek>(input: &mut T) -> ParseResult<Evtc> {
let mut archive = ZipArchive::new(input)?;
- let mut file = archive.by_index(0)?;
+ let mut file = BufReader::new(archive.by_index(0)?);
parse_file(&mut file)
}