Crates.io | wz_reader |
lib.rs | wz_reader |
version | |
source | src |
created_at | 2024-04-23 10:32:01.972613 |
updated_at | 2024-12-10 08:59:50.246956 |
description | A wz file reader to resolve wz file with thread safe |
homepage | https://github.com/spd789562/wz-reader-rs |
repository | https://github.com/spd789562/wz-reader-rs |
max_upload_size | |
id | 1217385 |
Cargo.toml error: | TOML parse error at line 17, column 1 | 17 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
Maplestory *.Wz file reading written in rust, try port similer code from WzComparerR2.WzLib and MapleLib
It a rust learning project, performance maybe not as good as C#.
wz_reader's MSRV is 1.70.0
use wz_reader::util::{resolve_base, walk_node};
// NodeCast trait provide try_as_* functions to casting WzNode
use wz_reader::NodeCast;
fn main() {
// resolve wz files
let base_node = resolve_base(r"D:\MapleStory\Data\Base.wz", None).unwrap();
// try to parsing every nodes on the way
walk_node(&base_node, true, &|node| {
let node_read = node.read().unwrap();
if let Some(sound_node) = node_read.try_as_sound() {
let path = std::path::Path::new("./sounds").join(node_read.name.as_str());
if sound_node.save(path).is_err() {
println!("failed to extract sound: {}", node_read.get_full_path());
}
}
});
}
You can find more example usage in the examples folder.
This project is licensed under the MIT license.