1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
//! A simple parser and reader for Microsoft Compound Document File.
//!
//! This includes a basic parser, which validates the format of a given file
//! or a given stream.
//! It includes a reader too, for iterating over entries and for extracting
//! files inside the OLE storage.
//!
//! ## Example
//!
//! ```rust,ignore
//! use crate::ole::Reader;
//! use std::io::{Read, Write};
//!
//! let parser = Reader::from_path("data/test_email.msg").unwrap();
//!
//! // Iterate through the entries
//! for entry in parser.iterate() {
//! println!("{}", entry);
//! }
//!
//! // Extract a stream from the OLE storage
//! let entry = parser.iterate().next().unwrap();
//! let mut slice = parser.get_entry_slice(entry).unwrap();
//! let mut buffer = Vec::<u8>::with_capacity(slice.len());
//! slice.read_to_end(&mut buffer).unwrap();
//!
//! // Save the extracted stream
//! let mut extracted_file = std::fs::File::create("./file.bin").unwrap();
//! extracted_file.write_all(&buffer).unwrap();
//! ```
pub use Reader;
pub
pub use OLEIterator;
pub use Error;
pub
pub
pub
pub
pub use Entry;
pub use EntrySlice;
pub use EntryType;
pub