#nintendo #archive #byte #extract #good-feel #lz10 #good-feel-archives

gfarch

gfarch is a Rust crate for Good-Feel's GoodFeelArchives

4 releases

0.2.3 Nov 27, 2024
0.2.2 Nov 27, 2024
0.2.1 Nov 24, 2024
0.1.0 Nov 24, 2024

#119 in Games

Download history 151/week @ 2024-11-18 223/week @ 2024-11-25 5/week @ 2024-12-02 10/week @ 2024-12-09

389 downloads per month

MIT license

19KB
323 lines

GfArch

Rust crate for handling Good-Feel's GfArch files.

Capabilities

Archive Creation

  • Archives with Byte Pair Encoding
  • Archives with LZ10

Archive Extraction

  • Archives with Byte Pair Encoding
  • Archives with LZ10

Usage

Archive Creation

    // "archive_1" is now a GoodFeelArchive
    let archive_1 = gfarch::pack_from_files(
        &files,
        Version::V3,
        CompressionType::BPE,
        GFCPOffset::Default
    );

    // "archive_2" is now also a GoodFeelArchive
    let archive_2 = gfarch::pack_from_bytes(
        &byte_vectors,
        &filenames,
        Version::V3,
        CompressionType::BPE,
        GFCPOffset::Default
    );

Archive Extraction

    let archive = fs::read("my_file.gfa")?;
    // "files" is now a collection of file data and filenames
    let files = gfarch::extract(&archive)?;

Dependencies

~320–790KB
~17K SLoC