1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
//! Thin `bzip3` binary with reference behavior parity.
//!
//! Encode, decode, test, and recover modes run over the 9-byte streaming frame.
//! Exit codes, stderr texts, `.bz3` naming rules, and TTY refusal match
//! the C reference CLI. Recover mode differs from the reference: a damaged
//! block gives zero bytes or its checksum-faulty bytes, the exit code is 2,
//! and the run never removes a file. Each input file runs
//! alone, and success removes the input unless `-k`, `-c`, test, or recover mode applies.
//! The default job count uses all physical cores, a recorded
//! divergence from the C default of one thread. Output bytes stay
//! identical at every job count. `clap` generates the help text, a
//! recorded divergence from the reference layout.
//!
//! The binary only wires three modules: [`cli_args`] parses and validates
//! the command line, [`cli_iter`] walks and decodes block batches, and
//! [`cli_run`] executes files and standard streams.
use ExitCode;
use Stop;
use parse_config;
use run;