add uw8 pack command

This commit is contained in:
2021-12-27 22:02:27 +01:00
parent 462dc3a1c6
commit cf0e40a0e5
9 changed files with 183 additions and 122 deletions

View File

@@ -15,12 +15,12 @@ fn main() -> Result<()> {
}
"pack" => {
let mut config = uw8_tool::PackConfig::default();
if args.contains(["-c", "--compress"]) {
config = config.with_compression();
if args.contains(["-u", "--uncompressed"]) {
config = config.uncompressed();
}
let source: PathBuf = args.free_from_str()?;
let dest: PathBuf = args.free_from_str()?;
uw8_tool::pack_file(&source, &dest, config)?;
uw8_tool::pack_file(&source, &dest, &config)?;
}
"unpack" => {
let source: PathBuf = args.free_from_str()?;