Skip to main content

extract_zip

Function extract_zip 

Source
pub fn extract_zip(zip_path: &Path, dest_dir: &Path) -> Result<()>
Expand description

Extracts a zip archive to dest_dir with per-entry CRC32 verification and the default ExtractLimits.

Entry paths are validated with zip::read::ZipFile::enclosed_name so that archive entries containing .. or absolute paths cannot escape dest_dir.

ยงErrors

Returns an error if the file is not a valid zip archive, if IO fails, if CRC32 verification fails for any extracted entry (Error::ChecksumMismatch), or if the archive exceeds a default extraction limit (Error::ExtractLimitExceeded).