optional AES and custom compressionLevel

This commit is contained in:
Antoine Cœur
2017-10-08 13:28:00 +08:00
parent df25a4a43e
commit 181bdc693e
9 changed files with 130 additions and 38 deletions
+2 -2
View File
@@ -1,5 +1,5 @@
PODS:
- SSZipArchive (2.0.8)
- SSZipArchive (2.1.0)
DEPENDENCIES:
- SSZipArchive (from `..`)
@@ -9,7 +9,7 @@ EXTERNAL SOURCES:
:path: ..
SPEC CHECKSUMS:
SSZipArchive: e6ab66e1936fac7e3b5073e9f5eb364d91dfbfc7
SSZipArchive: 1e8e53dcb11bca3ded4738958dc49fc467320a14
PODFILE CHECKSUM: 0dc500eb72745751ccba7677de4da5534fcef36d
@@ -43,7 +43,13 @@ class ViewController: UIViewController {
zipPath = tempZipPath()
let password = passwordField.text
let success = SSZipArchive.createZipFile(atPath: zipPath!, withContentsOfDirectory: sampleDataPath, withPassword: password?.isEmpty == false ? password : nil)
let success = SSZipArchive.createZipFile(atPath: zipPath!,
withContentsOfDirectory: sampleDataPath,
keepParentDirectory: false,
compressionLevel: -1,
password: password?.isEmpty == false ? password : nil,
aes: true,
progressHandler: nil)
if success {
print("Success zip")
unzipButton.isEnabled = true