Skip to main content

Module progress

Module progress 

Source
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§

AtomicProgress
A thread-safe progress reporter using atomics.
ClosureProgress
A progress reporter that calls a closure.
NoProgress
A progress reporter that does nothing (null object pattern).
ProgressState
Progress state with timing and rate calculation.
StatisticsProgress
A progress reporter that collects statistics.
ThrottledProgress
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§

ProgressReporter
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.