tario
A library to asynchronously read and write TAR archives in Rust.
Tario supports the ustar TAR format. It focuses on efficiently abstracting TAR I/O rather than being a general purpose utility to make all kinds of TAR archives. If that's not what you need, there's tar-rs that you should check out.
Tario is:
- Minimal: Tario only does a few things, but well.
- Lightweight: Tario has minimal dependencies, is conservative on resources, makes no uneccessary copies and performs no allocations at runtime.
- Fast: Tario adds minimal overhead while working with archives.
Installation
Using Cargo:
Or manually by editing your project's Cargo.toml:
[dependencies]
tario = 0.1
Usage
Tario builds on Tokio's async read and write traits but is otherwise not using anything at all from it.
Writing
use ;
use ;
let mut io: = Vecnew;
let mut archive = new;
let mut files = ;
for in files
archive.finish.await?;
Reading
use io;
use ;
use Archive;
let io = new; // Get a reader from somewhere
let mut archive = new;
let buf = &mut ;
while let Some = archive.next_entry.await?
Roadmap
License
This project is licensed under the MIT license.