#nintendo #switch #read #yaz0 #compressed

bin+lib sarc

A library for working with Nintendo SARC files for Wii U, 3ds and Switch

4 stable releases

✓ Uses Rust 2018 edition

1.1.2 Jun 15, 2020
1.1.1 Mar 18, 2020
1.0.1 Feb 9, 2020
1.0.0 Feb 7, 2020
Download history 54/week @ 2020-03-15 41/week @ 2020-03-22 4/week @ 2020-03-29 18/week @ 2020-04-05 20/week @ 2020-04-12 4/week @ 2020-04-19 3/week @ 2020-04-26 1/week @ 2020-05-03 1/week @ 2020-05-10 17/week @ 2020-05-17 6/week @ 2020-05-24 12/week @ 2020-05-31 1/week @ 2020-06-07 22/week @ 2020-06-14 2/week @ 2020-06-21 7/week @ 2020-06-28

61 downloads per month

MIT license

19KB
457 lines

sarc

A simple to use library for reading/writing SARC and SZS (yaz0 compressed SARCs) in Rust.

// yaz0 and non-yaz0 sarcs can be read the same way
let sarc = SarcFile::read_from_file("Animal_Fish_A.sbactorpack").unwrap();

// iterate through files in the sarc and print out a file list
for file in &sarc.files {
    println!("Name: {:?} | Size: {}", file.name, file.data.len());
}

// write as yaz0 compressed sarc
sarc.write_to_compressed_file("animal_test.sarc").unwrap();

lib.rs:

A simple to use library for reading/writing SARC and SZS (yaz0 compressed SARCs) in Rust.

// yaz0 and non-yaz0 sarcs can be read the same way
let sarc = SarcFile::read_from_file("Animal_Fish_A.sbactorpack").unwrap();

// iterate through files in the sarc and print out a file list
for file in &sarc.files {
    println!("Name: {:?} | Size: {}", file.name, file.data.len());
}

// write as yaz0 compressed sarc
sarc.write_to_compressed_file("animal_test.sarc").unwrap();

Features

yaz0_sarc - support reading/writing yaz0-compressed sarc files zstd_sarc - support reading/writing yaz0-compressed sarc files

Dependencies

~1–2.2MB
~47K SLoC