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
//! `arsc` is a simple library that enables parsing and writing Android resource files (arsc)
//!
//! # Example
//! ```rust
//! use arsc::{parse, write};
//!
//! fn main() -> std::io::Result<()> {
//! let arsc = parse("/resources.arsc")?;
//! let _ = write(&arsc, "/output.arsc")?;
//! Ok(())
//! }
//! ```
extern crate core;
use File;
use Path;
pub use *;
/// Parse an arsc file into structured data
///
/// # Argument:
/// * path - the path pointing to the arsc file
/// # Returns:
/// a parsed arsc struct
/// # Error:
/// * io errors
/// Write a structured Arsc to arsc file
///
/// # Arguments:
/// * arsc - a structured Arsc file needs to be written
/// * output_path - the path pointing to the written out arsc file
///
/// # Returns:
/// the number of bytes that have been written
/// # Error:
/// * io errors