Crates.io | akv |
lib.rs | akv |
version | 0.1.0 |
source | src |
created_at | 2023-01-07 03:45:50.109108 |
updated_at | 2023-01-07 03:45:50.109108 |
description | Safe bindings for libarchive with minimum overhead |
homepage | https://github.com/patr0nus/akv |
repository | https://github.com/patr0nus/akv |
max_upload_size | |
id | 752758 |
size | 34,401 |
Safe bindings for libarchive with minimum overhead
use akv::reader::ArchiveReader;
let io_reader = std::fs::File::open("tests/simple.zip")?;
let mut archive_reader = ArchiveReader::open_io(io_reader)?;
while let Some(entry) = archive_reader.next_entry()? {
println!("Entry name: {}", entry.pathname_utf8()?);
let entry_reader = entry.into_reader();
println!(
"Entry content: {}",
std::io::read_to_string(entry_reader)?
);
}
std::io::Result::Ok(())