[][src]Crate 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();

Features

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

Modules

parser
writer

Structs

SarcEntry

A file contained within a Sarc archive

SarcFile

An in-memory representation of a Sarc archive

Enums

Endian

Byte order of the give sarc file

Functions

sfat_hash

Hashing function used for hashing sfat strings