Expand description
Library surface behind the stuffr binary.
Two reasons it exists. cli::Cli is here so tests/cli.rs can
introspect it through clap::CommandFactory: the examples page’s test
asserts every flag and subcommand clap knows about is mentioned on the
page, and doing that against the real Cli (rather than a hand-copied
list of flag names) keeps the assertion honest as the surface grows.
compat is here so that main, the integration tests and the compat
fuzz target all drive the same compatibility families (bzip2 and
friends) and install-links. bench is here so its
harness, scoring and renderers can be tested with injected times: the CLI
tests run a debug binary, where stuffr bench refuses to time anything.
format_by_name is the --format/--formats lookup main and
bench share.
None of this is a stable API; it is the binary’s own code, kept public
for those callers. bench and format_by_name stay documented, as
cli, compat and size are, rather than #[doc(hidden)]: this
crate’s docs are the binary’s internals docs, and hiding two of its
modules would only make them harder to find.
Modules§
- bench
stuffr bench: compares codecs on the user’s own files.- cli
- The
stuffrcommand’s argument surface. - compat
- Compatibility links: when the binary is invoked under another tool’s name (through a symlink), it behaves as that tool, with that tool’s flags, messages and exit codes, not stuffr’s.
- size
- Parsing for
--memory-limit.
Functions§
- format_
by_ name - Resolves a
--formatname against the registry. Shared bymain’s verbs andstuffr bench.