Crate archiv

source ·
Expand description
use archiv::Compress;

let opts = archiv::CompressOptions::default();
let mut archiv = opts.stream_compress(io::stdout())?;
archiv.write_item(b"hello")?;
archiv.finish()?;
use archiv::Expand;

let opts = archiv::ExpandOptions::default();
let mut archiv = opts.stream(io::stdin().lock())?;
while let Some(mut item) = archiv.next_item()? {
    let mut s = String::new();
    item.read_to_string(&mut s)?;
    println!("{s}");
}

Structs

Enums

  • Library specific errors we can encounter, typically around underlying or format errors

Traits

  • Trait for writing compressed streams
  • Trait for reading from compressed streams