rpgcpf
⚠️ this is alpha quality software! there may be some unknown bugs! ⚠️
rpgcpf is a rust library and command line tool for compressing and decompressing godot compressed packed format (GCPF) files.
This repository contains a rust library and a command line application.
features
- compressing a file to the GCPF format
- decompressing GCPF files
- supports all five compression modes used by GCPF: brotli, deflate, fastlz, gzip, and zstd
- rust library
- command line tool
rpgcpf cli
The rpgcpf cli tool decompresses GCPF files, and compresses uncompressed files to the GCPF format.
Usage: rpgcpf <COMMAND>
Commands:
pack Compress an input to an output
unpack Decompress an input to an output
info Show info and statistics about an input
help Print this message or the help of the given subcommand(s)
Options:
-h, --help
Print help (see a summary with '-h')
-V, --version
Print version
installation
for now rpgcpf is only available through cargo, but there are plans to package it for distribution when it's more stable.
cargo install rpgcpf --git https://git.sr.ht/~absolutely-vivid/rpgcpf
rpgcpf
rpgcpf is a rust library implementing GCPF compression in decompression. It supports the brotli, deflate, fastlz, gzip, and zstd compression modes.
TODO: add docs link
Decompression example:
use Gcpf;
let data: & = /* ... */;
let mut uncompressed = read
.unwrap
.decompress
.unwrap
Compression example:
use ;
let data: & = /* ... */;
let mut compressed = compress.unwrap;
installation
rpgcpf isn't available on crates.io, but there are plans to make it available for distribution when it reaches a more stable release.
cargo add rpgcpf --git https://git.sr.ht/~absolutely-vivid/rpgcpf
cargo features
rpgcpf uses cargo features to enable or disable compression modes at compile time. these features are:
brotli: enables the brotli comression mode, depends on thebrotlicratedeflate: enables the deflate comression mode, depends on theflate2cratefastlz: enables the fastlz comression mode, depends on thefastlz-rscrategzip: enables the gzip comression mode, depends on theflate2cratezstd: enables the zstd comression mode, depends on thezstdcrate
the default features are: ["brotli", "deflate", "fastlz", "gzip", "zstd"]
contributing
TODO