pub enum Command {
Pack {
paths: Vec<String>,
output: Option<String>,
format: Option<String>,
level: Option<i32>,
force: bool,
no_sync: bool,
allow_weak_encoder: bool,
threads: Option<usize>,
turbo: bool,
memory_limit: Option<String>,
strict_fidelity: bool,
},
Unpack {
input: String,
patterns: Vec<String>,
index: Vec<usize>,
directory: Option<String>,
strict_fidelity: bool,
output: Option<String>,
force: bool,
format: Option<String>,
max_ratio: Option<u64>,
no_sync: bool,
memory_limit: Option<String>,
},
Cat {
input: String,
patterns: Vec<String>,
index: Vec<usize>,
format: Option<String>,
max_ratio: Option<u64>,
memory_limit: Option<String>,
},
Info {
input: String,
json: bool,
memory_limit: Option<String>,
},
Formats,
List {
input: String,
json: bool,
max_ratio: Option<u64>,
memory_limit: Option<String>,
strict_fidelity: bool,
},
Test {
input: String,
max_ratio: Option<u64>,
memory_limit: Option<String>,
strict_fidelity: bool,
},
}Variants§
Pack
Compress a file, or collect several into an archive.
Fields
paths: Vec<String>Input paths, or - for stdin.
More than one path needs an output that names a CONTAINER (-o bundle.tar, or --format tar): a codec compresses one stream and
has nowhere to put a second.
allow_weak_encoder: boolUse a weak fallback encoder that this build ships in place of the format’s real one. Worse ratio, and buffers the whole input.
threads: Option<usize>Encode with N worker threads. 0 means auto-detect.
OMITTING this flag is not the same as passing 0: without it, stuffr encodes single-threaded, so the same input always produces the same bytes on any machine. Multi-threaded xz and zstd split the input per worker, so their output depends on the worker count.
turbo: boolUse the full detected CPU budget, uncapped.
Lifts the CPU cap only — --memory-limit still binds. Turbo means
“use my cores”, not “ignore the OOM killer”.
Unpack
Decompress a file, or extract an archive’s entries.
Fields
patterns: Vec<String>Entries to extract; every entry when none are given.
An exact entry name, or a directory selecting everything beneath it. Needs -C, which is what asks for entry-aware extraction.
index: Vec<usize>Extract the entry at this position instead of naming it. Repeatable.
0-BASED, counting in archive order — the same number stuffr list
prints in its first column. This is how you reach an entry whose
name you cannot type: two entries sharing a name in a zip’s index,
or Makefile and makefile from a case-sensitive filesystem on a
case-insensitive one. Needs -C, like PATTERNS, and cannot be
combined with them — they are two ways of saying the same thing.
directory: Option<String>Extract the archive’s entries into this directory.
Absolute entry paths, .. traversal and symlinks escaping this
directory are refused (exit 7), never silently sanitised.
strict_fidelity: boolFail (exit 4) if anything was approximated or lost.
On extraction that means an entry whose mode or mtime could not be restored, or one skipped for having no shape on disk.
Cat
Decompress a file, or stream an archive’s entries, to stdout.
Fields
patterns: Vec<String>Entries whose bytes to stream, in archive order.
An exact entry name, or a directory selecting everything beneath
it. Naming one is what asks for entry-aware streaming; without
any, cat decodes the input as a single stream.
index: Vec<usize>Stream the entry at this position instead of naming it. Repeatable.
0-BASED, counting in archive order — the same number stuffr list
prints in its first column. stuffr cat a.zip --index 6 > out.sh
is how you pull out an entry whose name is ambiguous or
untypeable. Like PATTERNS, naming one asks for entry-aware
streaming; the two cannot be combined.
Info
Identify a stream without decoding it.
Fields
Formats
List the formats this build contains.
List
List an archive’s entries without extracting.
The first column is the entry’s 0-based position in archive order,
which is what cat --index and unpack --index select by.
Fields
max_ratio: Option<u64>Refuse a codec layer beneath the container expanding by more
than this ratio (e.g. a .tar.gz bomb).
memory_limit: Option<String>Cap the memory stuffr will ask for, e.g. 512M or 2G.
Bounds the codec layer beneath the container, which --max-ratio
cannot see: a pure xz/lzma/lzip decoder sizes its dictionary from
a value the file declares in its own header, before producing any
output. Defaults to 25% of available RAM, honouring cgroup limits.
Test
Verify every entry’s integrity without extracting.
Fields
max_ratio: Option<u64>Refuse a codec layer beneath the container expanding by more
than this ratio (e.g. a .tar.gz bomb).
memory_limit: Option<String>Cap the memory stuffr will ask for, e.g. 512M or 2G.
Bounds the codec layer beneath the container, which --max-ratio
cannot see: a pure xz/lzma/lzip decoder sizes its dictionary from
a value the file declares in its own header, before producing any
output. Defaults to 25% of available RAM, honouring cgroup limits.
Trait Implementations§
Source§impl FromArgMatches for Command
impl FromArgMatches for Command
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut<'b>(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§impl Subcommand for Command
impl Subcommand for Command
Source§fn augment_subcommands<'b>(__clap_app: Command) -> Command
fn augment_subcommands<'b>(__clap_app: Command) -> Command
Source§fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§fn has_subcommand(__clap_name: &str) -> bool
fn has_subcommand(__clap_name: &str) -> bool
Self can parse a specific subcommand