archive-trait
Asynchronous traits for reading and writing archives.
This crate is a component of astral-codec. Both tar-codec and zip-codec implement these traits.
Reading
A function that takes an Archive can read either format. For example, to
print each member's path:
use Archive;
async
To extract the members to a directory, use Archive::extract_in with an
ExtractPolicy.
Writing
Call ArchiveBuilder::builder on a tar or ZIP encoder to get a Builder.
Pass EntryMetadata to Builder::add_file to use the encoder's defaults,
or pass the encoder's file options to override them for one file.
Builder::add_directory_all adds a directory and its contents recursively.