znippy-decompress 0.9.2

Decompress logic for Znippy, a parallel chunked compression system.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use anyhow::{Context, Result};
use std::path::{Path, PathBuf};
use znippy_common::{IndexFilter, VerifyReport};

pub fn decompress_archive(archive_path: &Path, output_dir: &Path) -> Result<VerifyReport> {
    znippy_common::decompress_archive(archive_path, true, output_dir)
}

/// Selective extract: reconstruct only the files whose `(pkg_type, repo)`
/// sub-index matches `filter`. An empty filter equals [`decompress_archive`].
pub fn decompress_archive_filtered(
    archive_path: &Path,
    output_dir: &Path,
    filter: &IndexFilter,
) -> Result<VerifyReport> {
    znippy_common::decompress_archive_filtered(archive_path, true, output_dir, filter)
}