Skip to content

Commit e036e07

Browse files
committed
Version 2.0.0
1 parent e6bc9da commit e036e07

File tree

7 files changed

+451
-193
lines changed

7 files changed

+451
-193
lines changed

.cargo/config.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[build]
2+
rustflags = [
3+
"-C", "target-feature=+aes,+sse2",
4+
"-C", "target-feature=+crt-static",
5+
]

Cargo.toml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
[package]
22
name = "rpgmad-lib"
3-
version = "1.0.2"
3+
version = "2.0.0"
44
authors = ["savannstm <savannstm@gmail.com>"]
55
edition = "2021"
66
rust-version = "1.60.0"
7-
description = "A decrypter implementation for rpgm-archive-decrypter. Not intended for use in other applications; but can be."
7+
description = "Library for decrypting RPG Maker `rgss` archives."
88
readme = "README.md"
99
repository = "https://github.com/savannstm/rpgm-archive-decrypter-lib"
1010
documentation = "https://docs.rs/rpgmad-lib"
1111
license-file = "LICENSE.md"
1212

13-
[features]
14-
rayon = ["dep:rayon"]
15-
1613
[dependencies]
17-
arrayvec = "0.7.6"
18-
rayon = { version = "1.10.0", optional = true }
14+
thiserror = "1.0.65"
15+
16+
[dev-dependencies]
17+
marshal-rs = "0.4.0"
18+
png = "0.17.16"

README.md

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,26 @@
11
# rpgm-archive-decrypter-lib
22

3-
A decrypter implementation for [rpgm-archive-decrypter](https://github.com/savannstm/rpgm-archive-decrypter).
4-
Not intended for use in other applications; but can be.
3+
Library for decrypting RPG Maker `rgss` archives.
54

6-
## Quick example
5+
Used in [rpgm-archive-decrypter](https://github.com/savannstm/rpgm-archive-decrypter).
6+
7+
## Example
78

89
```rust
9-
let archive_bytes = std::fs::read("C:/Documents/Game/Game.rgssad");
10-
let mut decrypter = rpgmad_lib::Decrypter::new();
10+
use rpgmad_lib::{Decrypter, extract_archive};
11+
12+
// Using Decrypter struct
13+
let archive_content: Vec<u8> = std::fs::read("C:/Game/Game.rgss3a").unwrap();
14+
let mut decrypter = Decrypter::new();
15+
16+
// You can optionally set force
17+
// decrypter.set_force(true)
18+
19+
decrypter.extract(&archive_content, "C:/Game").unwrap();
1120

12-
// Writes decrypted game files to "C:/Documents/Game"
13-
decrypter.extract("C:/Documents/Game", false).unwrap()
21+
// Using function
22+
// let force = false; // When `true`, it will overwrite existing files in the game directory.
23+
// extract_archive(&archive_content, "C:/Game", force).unwrap();
1424
```
1525

1626
## License

examples/example.rs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
use rpgmad_lib::{extract_archive, Decrypter};
2+
3+
fn main() {
4+
// Using Decrypter struct
5+
let archive_content: Vec<u8> = std::fs::read("C:/Game/Game.rgss3a").unwrap();
6+
let mut decrypter = Decrypter::new();
7+
8+
// You can optionally set force
9+
// decrypter.set_force(true)
10+
11+
decrypter.extract(&archive_content, "C:/Game").unwrap();
12+
13+
// Using function
14+
let force = false; // When `true`, it will overwrite existing files in the game directory.
15+
extract_archive(&archive_content, "C:/Game", force).unwrap();
16+
}

rustfmt.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
line_width = 80

0 commit comments

Comments
 (0)