tools: add zip module

This modules contains the 'ZipEncoder' struct, which wraps an async writer,
to create a ZIP archive on the fly

To create a ZIP file, have a target that implements AsyncWrite,
give it to ZipEncoder::new, add entries via 'add_entry' and
at the end, call 'finish'

for now, this does not implement compression (uses ZIPs STORE mode), and
does not support empty directories or hardlinks (or any other special
files)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
Dominik Csapak
2020-10-21 09:29:06 +02:00
committed by Wolfgang Bumiller
parent 4e32d1c590
commit fdce52aa99
2 changed files with 519 additions and 0 deletions

View File

@ -36,6 +36,7 @@ pub mod logrotate;
pub mod loopdev;
pub mod fuse_loop;
pub mod socket;
pub mod zip;
mod parallel_handler;
pub use parallel_handler::*;