pub struct StreamingZipWriter { /* private fields */ }Expand description
Streaming ZIP writer that compresses data on-the-fly
Implementations§
Source§impl StreamingZipWriter
impl StreamingZipWriter
Sourcepub fn new<P: AsRef<Path>>(path: P) -> Result<Self>
pub fn new<P: AsRef<Path>>(path: P) -> Result<Self>
Create a new ZIP writer with default compression level (6)
Sourcepub fn with_compression<P: AsRef<Path>>(
path: P,
compression_level: u32,
) -> Result<Self>
pub fn with_compression<P: AsRef<Path>>( path: P, compression_level: u32, ) -> Result<Self>
Create a new ZIP writer with custom compression level (0-9)
Sourcepub fn start_entry(&mut self, name: &str) -> Result<()>
pub fn start_entry(&mut self, name: &str) -> Result<()>
Start a new entry (file) in the ZIP
Sourcepub fn write_data(&mut self, data: &[u8]) -> Result<()>
pub fn write_data(&mut self, data: &[u8]) -> Result<()>
Write uncompressed data to current entry (will be compressed on-the-fly)