nzb_postproc/lib.rs
1//! Post-processing pipeline: par2 verify/repair, RAR/7z/TAR/ZIP extraction, cleanup.
2//!
3//! This crate contains:
4//! - `detect` — File detection helpers (par2, RAR, 7z, TAR, ZIP, cleanup candidates)
5//! - `par2` — Native PAR2 verify/repair via `rust-par2`
6//! - `unpack` — RAR/7z extraction (system tools), TAR/ZIP (native crates)
7//! - `pipeline` — Orchestrate: verify -> repair -> extract -> cleanup
8
9pub mod detect;
10pub mod par2;
11pub mod pipeline;
12pub mod resources;
13pub mod unpack;
14
15// Re-export nzb-core (and transitively nzb-nntp) so consumers only
16// need nzb-postproc as a single dependency.
17pub use nzb_core;
18
19pub use detect::{
20 ArchiveType, RarVolumeInfo, has_rar_signature, has_usable_output, parse_rar_volume,
21 parse_rar_volume_at,
22};
23pub use par2::recovery_can_cover;
24pub use pipeline::{
25 PostProcConfig, PostProcResult, run_pipeline, run_pipeline_with_cleanup,
26 run_pipeline_with_resources,
27};
28pub use resources::{PostProcLimits, PostProcResourcePool, PostProcResourceSnapshot};
29pub use unpack::{extract_tar, find_unrar};