async_zip
An asynchronous ZIP archive reading/writing crate.
Features
- A base implementation atop
futures's IO traits. - An extended implementation atop
tokio's IO traits. - Support for Stored, Deflate, bzip2, LZMA, zstd, and xz compression methods.
- Various different reading approaches (seek, seek factories, stream).
- Support for writing complete data (u8 slices) or stream using data descriptors.
- Initial support for ZIP64 reading and writing.
- Aims for reasonable specification compliance.
Installation & Basic Usage
[]
= { = "0.0.19", = ["full"] }
= { = "0.7", = ["compat"] } # if using tokio
A (soon to be) extensive list of examples can be found under the /examples directory.
Feature Flags
full- Enables all below features.full-wasm- Enables all below features that are compatible with WASM.tracing- Enables support fortracing.chrono- Enables support for parsing dates viachrono.tokio- Enables support for thetokioimplementation module.tokio-fs- Enables support for thetokio::fsreading module.deflate- Enables support for the Deflate compression method.bzip2- Enables support for the bzip2 compression method.lzma- Enables support for the LZMA compression method.zstd- Enables support for the zstd compression method.xz- Enables support for the xz compression method.
Reading
use AsyncReadExt;
use ;
use TokioAsyncReadCompatExt;
use ZipArchiveReader;
async
Writing
use ZipFileWriter;
use ;
use File;
...
let mut file = create.await?;
let mut writer = with_tokio;
let data = b"This is an example file.";
let builder = new;
writer.write_entry_whole.await?;
writer.close.await?;
Contributions
Whilst I will be continuing to maintain this crate myself, reasonable specification compliance is a huge undertaking for a single individual. As such, contributions will always be encouraged and appreciated.
No contribution guidelines exist but additions should be developed with readability in mind, with appropriate comments, and make use of rustfmt.
Issues & Support
Whether you're wanting to report a bug you've come across during use of this crate or are seeking general help/assistance, please utilise the issues tracker and provide as much detail as possible (eg. recreation steps).
I try to respond to issues within a reasonable timeframe.