OLE
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.
Usage
Add this to your Cargo.toml
:
[]
= "0.1.15"
and this to your crate root:
extern crate ole;
Example
use Reader;
use ;
let mut file = open.unwrap;
let mut parser = new.unwrap;
// Iterate through the entries
for entry in parser.iterate
// We're going to extract a file from the OLE storage
let entry = parser.iterate.next.unwrap;
let mut slice = parser.get_entry_slice.unwrap;
let mut buffer = with_capacity;
slice.read_to_end;
// Saves the extracted file
let mut extracted_file = create.unwrap;
extracted_file.write_all;
Releases
Release notes are available in RELEASES.md.
Compatibility
ole
seems to work for rust 1.9 and greater.