mirror of
https://github.com/xavo95/repak.git
synced 2025-01-18 19:04:07 +00:00
Expose compression to repak_cli
This commit is contained in:
parent
0a06dbcf31
commit
2feadd48c8
1 changed files with 15 additions and 6 deletions
|
@ -92,6 +92,13 @@ struct ActionPack {
|
||||||
)]
|
)]
|
||||||
version: repak::Version,
|
version: repak::Version,
|
||||||
|
|
||||||
|
/// Compressio
|
||||||
|
#[arg(
|
||||||
|
long,
|
||||||
|
value_parser = clap::builder::PossibleValuesParser::new(repak::Compression::VARIANTS).map(|s| s.parse::<repak::Compression>().unwrap())
|
||||||
|
)]
|
||||||
|
compression: Option<repak::Compression>,
|
||||||
|
|
||||||
/// Path hash seed for >= V10
|
/// Path hash seed for >= V10
|
||||||
#[arg(short, long, default_value = "0")]
|
#[arg(short, long, default_value = "0")]
|
||||||
path_hash_seed: u64,
|
path_hash_seed: u64,
|
||||||
|
@ -453,7 +460,9 @@ fn pack(args: ActionPack) -> Result<(), repak::Error> {
|
||||||
collect_files(&mut paths, input_path)?;
|
collect_files(&mut paths, input_path)?;
|
||||||
paths.sort();
|
paths.sort();
|
||||||
|
|
||||||
let mut pak = repak::PakBuilder::new().writer(
|
let mut pak = repak::PakBuilder::new()
|
||||||
|
.compression(args.compression.iter().cloned())
|
||||||
|
.writer(
|
||||||
BufWriter::new(File::create(&output)?),
|
BufWriter::new(File::create(&output)?),
|
||||||
args.version,
|
args.version,
|
||||||
args.mount_point,
|
args.mount_point,
|
||||||
|
|
Loading…
Reference in a new issue