pub fn measure(
codec: &str,
level: Option<i32>,
input: &Input,
plan: &Plan,
clock: &mut dyn Clock,
progress: &mut dyn FnMut(Phase, u64, u64),
) -> OutcomeExpand description
Compresses and decompresses input with codec at level (None: the
encoder’s own default) under plan. Every error, a rejected level
included, is a failed row; nothing panics.
progress is called only between timed pieces, never inside one, with
(phase, done, total); total is the input’s size. Each repeat opens
with exactly one (Compress, 0, total); after it, Compress reports
the input bytes the encoder has taken, rising strictly, and Decompress
the bytes the decoder has given back, never falling; both end at
total and never pass it. With Mode::PerFile the two phases take
turns, file by file, each counting on across the files.