Crates.io | festy |
lib.rs | festy |
version | 1.0.1 |
source | src |
created_at | 2022-12-10 14:52:37.856065 |
updated_at | 2022-12-10 17:33:35.022042 |
description | 3DS save file decompressor |
homepage | https://github.com/chrom-sevy/festy |
repository | https://github.com/chrom-sevy/festy |
max_upload_size | |
id | 733870 |
size | 29,180 |
3DS compression written in rust for the sake of accessibility. FEST requires the dotnet Framework runtime to be compiled and run. By using rust crate, it should be trivial to port 3DS savefile decompression functionality anywhere.
As of now, the compression is not implemented as it doesn't appear to be a 100% match of the original encrypted file. Don't worry, both citra and the 3ds can read unencrypted files just fine. According to muhmuhten there this edge case across localizations where the header is smaller in japanese so they decided to encrypt it -- don't quote me on this I don't even know if I remember it correctly.
Just make sure to not have too many files in your save directory, as the game will almost certainly crash if it is too full.
This is simply the crate, which you can find under https://crates.io/crates/festy.
use festy;
fn main() {
// read an encrypted/compressed file into a buffer
let file_encrypted = std::fs::read("chapter0").unwrap();
// decompress the file_buffer and return the decompressed buffer
let file_buffer = festy::file::decompres(file_encrypted).unwrap();
// write the buffer to a file
std::fs::write_to_file("chapter0_dec", &file_buffer).unwrap();
}
most of the work goes to muhmuhten, who is the one responsible for the logic.