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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
//! `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 ;
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
/// Parse an arsc file into structured data
///
/// # Argument:
/// * reader - a seekable reader that reads bytes data from 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
/// Write a structured Arsc to designated writer
///
/// # Arguments:
/// * arsc - a structured Arsc file needs to be written
/// * output - the output writer that the bytes will be written to
///
/// # Returns:
/// the number of bytes that have been written
/// # Error:
/// * io errors