Perfect Zip compression utility.

Perfect Zip 简体中文

Get Involed with Perfect!

Star Perfect On Github Stack Overflow Follow Perfect on Twitter Join the Perfect Slack

Swift 3.0 Platforms OS X | Linux License Apache PerfectlySoft Twitter Slack Status

Perfect Zip utility

This Perfect module wraps the minizip C library and provides simple zip and unzip functionality.

Including in your project

Add this project as a dependency in your Package.swift file.

.Package(url: "", majorVersion: 3)


The following will zip the specified directory:

import PerfectZip

let zippy = Zip()

let thisZipFile = "/path/to/"
let sourceDir = "/path/to/files/"

let ZipResult = zippy.zipFiles(
	paths: [sourceDir], 
	zipFilePath: thisZipFile, 
	overwrite: true, password: ""
print("ZipResult Result: \(ZipResult.description)")

To unzip a file:

import PerfectZip

let zippy = Zip()

let sourceDir = "/path/to/files/"
let thisZipFile = "/path/to/"

let UnZipResult = zippy.unzipFile(
	source: thisZipFile, 
	destination: sourceDir, 
	overwrite: true
print("Unzip Result: \(UnZipResult.description)")

Further Information

For more information on the Perfect project, please visit


  • Swift Tools 4.0.0
View More Packages from this Author


Last updated: Wed Nov 09 2022 04:33:14 GMT-0500 (GMT-05:00)