]> git.proxmox.com Git - proxmox-backup.git/commit
tools: add zip module
authorDominik Csapak <d.csapak@proxmox.com>
Wed, 21 Oct 2020 07:29:06 +0000 (09:29 +0200)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Wed, 21 Oct 2020 08:04:18 +0000 (10:04 +0200)
commitfdce52aa99aaeebdfd21db69c0dceb0ecd0f978e
tree4970d70b57cc380a9a2d20f40fbd83b7bd2592e5
parent4e32d1c59077a46521b7af33977fb0686a61eb46
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>
src/tools.rs
src/tools/zip.rs [new file with mode: 0644]