Skip to main content

pack_archive

Function pack_archive 

Source
pub fn pack_archive(opts: &PackOptions<'_>) -> Result<()>
Expand description

Pack the post-processing outputs into a zip archive.

Returns an io::Result rather than crate::processor::PostError because callers (binary mains) are already Box<dyn Error>-typed.

IO performance: the underlying file is wrapped in a 64 KiB BufWriter before handing it to ZipWriter. The zip crate’s internal deflate output is small chunks (per-block from miniz); without buffering each chunk would be its own write() syscall. Measured ~6× fewer syscalls on 1910.01256 (7 resource files + HTML).