Expand description
Enhanced progress reporting for archive operations.
This module provides extended progress callbacks with support for:
- Cancellation signaling (return false to abort)
- Compression ratio tracking
- ETA calculation
- Rate limiting callbacks to reduce overhead
§Example
ⓘ
use zesven::progress::{ProgressReporter, StatisticsProgress};
use zesven::{Archive, ExtractOptions};
let progress = StatisticsProgress::new();
let options = ExtractOptions::new().progress(progress);
archive.extract("./output", (), &options)?;Structs§
- Atomic
Progress - A thread-safe progress reporter using atomics.
- Closure
Progress - A progress reporter that calls a closure.
- NoProgress
- A progress reporter that does nothing (null object pattern).
- Progress
State - Progress state with timing and rate calculation.
- Statistics
Progress - A progress reporter that collects statistics.
- Throttled
Progress - A progress reporter that rate-limits callbacks.
Constants§
- BYTES_
GIB - IEC byte unit: 1 GiB = 1024 MiB.
- BYTES_
KIB - IEC byte unit: 1 KiB = 1024 bytes.
- BYTES_
MIB - IEC byte unit: 1 MiB = 1024 KiB.
Traits§
- Progress
Reporter - Progress reporting trait for archive operations.
Functions§
- format_
bytes_ iec - Formats bytes as a human-readable string using IEC units (KiB, MiB, GiB).
- format_
bytes_ iec_ usize - Formats bytes as a human-readable string using IEC units.
- format_
bytes_ per_ second_ iec - Formats bytes per second as a human-readable string using IEC units.
- format_
duration - Formats a duration as a human-readable string.
- progress_
fn - Creates a closure-based progress reporter.