gfarch 0.6.0

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

GfArch

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

Capabilities

You can extract and create archives that use the following compression algorithms:

  • None
  • Byte Pair Encoding
  • LZ10

Usage

Archive Creation

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

    // "archive_2" is now also a GoodFeelArchive
    let archive_2 = gfarch::pack_from_bytes(
        &byte_vectors,
        &filenames,
        Version::V3,
        CompressionType::BPE,
        GFCPOffset::Custom(0x2000), // you can specify a custom offset for the compressed data
        Alignment::Custom(0x2000), // and you can also specify alignment for decompressed data
    );

Archive Extraction

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

Custom Compression Types

Below is a table of custom compression types that can be used instead of BPE or LZ10. To use one, enable its feature.

Compression GFCP Value (Decimal)
zlib 10

Notable Dependencies