sarc-rs

Crates.iosarc-rs
lib.rssarc-rs
version1.0.0
sourcesrc
created_at2021-04-15 03:47:49.608313
updated_at2022-07-17 03:16:03.780134
descriptionA simple to use library for parsing and creating Nintendo SARC files in Rust
homepage
repositoryhttps://github.com/NiceneNerd/sarc-rs
max_upload_size
id384659
size11,228,622
Caleb Smith (NiceneNerd)

documentation

https://docs.rs/sarc-rs

README

SARC library for Rust

crates.io api license

A simple to use library for parsing and creating Nintendo SARC files in Rust. Uses zero allocation parsing and handles file alignment requirements for common formats and games like The Legend of Zelda: Breath of the Wild. This library is a port of the SARC implementation from the oead library.

Sample usage:

use sarc_rs::{Sarc, SarcWriter};
let data = std::fs::read("test/Dungeon119.pack").unwrap();
let sarc = Sarc::new(&data).unwrap(); // Read a SARC from binary data
for file in sarc.files() { // Iterate files in SARC
    if let Some(name) = file.name {
       println!("File name: {}", name); // Print file name
    }
    println!("File size: {}", file.data.len()); // Print data size
}
Commit count: 15

cargo fmt