diff --git a/Objective-Zip Tests/Objective-Zip_Swift_Tests.swift b/Objective-Zip Tests/Objective-Zip_Swift_Tests.swift index 44bbaf8..c4944b4 100644 --- a/Objective-Zip Tests/Objective-Zip_Swift_Tests.swift +++ b/Objective-Zip Tests/Objective-Zip_Swift_Tests.swift @@ -1,6 +1,6 @@ // // Objective-Zip_Swift_Tests.swift -// Objective-Zip v. 1.0.4 +// Objective-Zip v. 1.0.5 // // Created by Gianluca Bertani on 20/09/15. // Copyright 2009-2017 Gianluca Bertani. All rights reserved. diff --git a/Objective-Zip Tests/ObjectiveZip_Tests.m b/Objective-Zip Tests/ObjectiveZip_Tests.m index 5710e59..c8552c3 100644 --- a/Objective-Zip Tests/ObjectiveZip_Tests.m +++ b/Objective-Zip Tests/ObjectiveZip_Tests.m @@ -1,6 +1,6 @@ // // ObjectiveZip_Tests.m -// Objective-Zip v. 1.0.4 +// Objective-Zip v. 1.0.5 // // Created by Gianluca Bertani on 29/08/15. // Copyright 2009-2017 Gianluca Bertani. All rights reserved. diff --git a/Objective-Zip.xcodeproj/project.pbxproj b/Objective-Zip.xcodeproj/project.pbxproj index 219e698..ed9ef4c 100755 --- a/Objective-Zip.xcodeproj/project.pbxproj +++ b/Objective-Zip.xcodeproj/project.pbxproj @@ -139,16 +139,16 @@ /* Begin PBXFileReference section */ 1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 8C14E8181773A09F00B84597 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; }; - 8C1D598C1771057D006D69C3 /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README.md; sourceTree = ""; }; + 8C1D598C1771057D006D69C3 /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; lineEnding = 0; path = README.md; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.markdown; }; 8C33B2C01EC6F0CD00F49381 /* crypt.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = crypt.c; sourceTree = ""; }; - 8C33B2C31EC6F50400F49381 /* NSDate+DOSDate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NSDate+DOSDate.h"; sourceTree = ""; }; - 8C33B2C41EC6F9AD00F49381 /* NSDate+DOSDate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSDate+DOSDate.m"; sourceTree = ""; }; - 8C33B2C91EC7441A00F49381 /* NSData+CRC32.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NSData+CRC32.h"; sourceTree = ""; }; - 8C33B2CA1EC7443200F49381 /* NSData+CRC32.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSData+CRC32.m"; sourceTree = ""; }; + 8C33B2C31EC6F50400F49381 /* NSDate+DOSDate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = "NSDate+DOSDate.h"; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; + 8C33B2C41EC6F9AD00F49381 /* NSDate+DOSDate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = "NSDate+DOSDate.m"; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; + 8C33B2C91EC7441A00F49381 /* NSData+CRC32.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = "NSData+CRC32.h"; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; + 8C33B2CA1EC7443200F49381 /* NSData+CRC32.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = "NSData+CRC32.m"; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; 8C33B2D01EC747A800F49381 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/Security.framework; sourceTree = DEVELOPER_DIR; }; 8C59F37F1BAEE3BB00DBB3D0 /* Objective-Zip Tests-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Objective-Zip Tests-Bridging-Header.h"; sourceTree = ""; }; 8C59F3801BAEE3BB00DBB3D0 /* Objective-Zip OS X Tests-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Objective-Zip OS X Tests-Bridging-Header.h"; sourceTree = ""; }; - 8C59F3811BAEE3BC00DBB3D0 /* Objective-Zip_Swift_Tests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Objective-Zip_Swift_Tests.swift"; sourceTree = ""; }; + 8C59F3811BAEE3BC00DBB3D0 /* Objective-Zip_Swift_Tests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = "Objective-Zip_Swift_Tests.swift"; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.swift; }; 8C59F3841BAEE48600DBB3D0 /* adler32.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = adler32.c; sourceTree = ""; }; 8C59F3851BAEE48600DBB3D0 /* compress.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = compress.c; sourceTree = ""; }; 8C59F3861BAEE48600DBB3D0 /* crc32.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = crc32.c; sourceTree = ""; }; @@ -182,36 +182,36 @@ 8C59F3CB1BAEE49400DBB3D0 /* unzip.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = unzip.h; sourceTree = ""; }; 8C59F3CC1BAEE49400DBB3D0 /* zip.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = zip.c; sourceTree = ""; }; 8C59F3CD1BAEE49400DBB3D0 /* zip.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = zip.h; sourceTree = ""; }; - 8C59F3D81BAEE4A100DBB3D0 /* Objective-Zip.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Objective-Zip.h"; sourceTree = ""; }; - 8C59F3D91BAEE4A100DBB3D0 /* Objective-Zip+NSError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Objective-Zip+NSError.h"; sourceTree = ""; }; - 8C59F3DA1BAEE4A100DBB3D0 /* OZFileInZipInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OZFileInZipInfo.h; sourceTree = ""; }; - 8C59F3DB1BAEE4A100DBB3D0 /* OZFileInZipInfo.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OZFileInZipInfo.m; sourceTree = ""; }; - 8C59F3DC1BAEE4A100DBB3D0 /* OZFileInZipInfo+Internals.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "OZFileInZipInfo+Internals.h"; sourceTree = ""; }; - 8C59F3DD1BAEE4A100DBB3D0 /* OZZipCompressionLevel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OZZipCompressionLevel.h; sourceTree = ""; }; - 8C59F3DE1BAEE4A100DBB3D0 /* OZZipException.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OZZipException.h; sourceTree = ""; }; - 8C59F3DF1BAEE4A100DBB3D0 /* OZZipException.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OZZipException.m; sourceTree = ""; }; - 8C59F3E01BAEE4A100DBB3D0 /* OZZipException+Internals.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "OZZipException+Internals.h"; sourceTree = ""; }; - 8C59F3E11BAEE4A100DBB3D0 /* OZZipFile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OZZipFile.h; sourceTree = ""; }; - 8C59F3E21BAEE4A100DBB3D0 /* OZZipFile.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OZZipFile.m; sourceTree = ""; }; - 8C59F3E31BAEE4A100DBB3D0 /* OZZipFile+NSError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "OZZipFile+NSError.h"; sourceTree = ""; }; - 8C59F3E41BAEE4A100DBB3D0 /* OZZipFile+Standard.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "OZZipFile+Standard.h"; sourceTree = ""; }; - 8C59F3E51BAEE4A100DBB3D0 /* OZZipFileMode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OZZipFileMode.h; sourceTree = ""; }; - 8C59F3E61BAEE4A100DBB3D0 /* OZZipReadStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OZZipReadStream.h; sourceTree = ""; }; - 8C59F3E71BAEE4A100DBB3D0 /* OZZipReadStream.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OZZipReadStream.m; sourceTree = ""; }; - 8C59F3E81BAEE4A100DBB3D0 /* OZZipReadStream+Internals.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "OZZipReadStream+Internals.h"; sourceTree = ""; }; - 8C59F3E91BAEE4A100DBB3D0 /* OZZipReadStream+NSError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "OZZipReadStream+NSError.h"; sourceTree = ""; }; - 8C59F3EA1BAEE4A100DBB3D0 /* OZZipReadStream+Standard.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "OZZipReadStream+Standard.h"; sourceTree = ""; }; - 8C59F3EB1BAEE4A100DBB3D0 /* OZZipWriteStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OZZipWriteStream.h; sourceTree = ""; }; - 8C59F3EC1BAEE4A100DBB3D0 /* OZZipWriteStream.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OZZipWriteStream.m; sourceTree = ""; }; - 8C59F3ED1BAEE4A100DBB3D0 /* OZZipWriteStream+Internals.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "OZZipWriteStream+Internals.h"; sourceTree = ""; }; - 8C59F3EE1BAEE4A100DBB3D0 /* OZZipWriteStream+NSError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "OZZipWriteStream+NSError.h"; sourceTree = ""; }; - 8C59F3EF1BAEE4A100DBB3D0 /* OZZipWriteStream+Standard.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "OZZipWriteStream+Standard.h"; sourceTree = ""; }; + 8C59F3D81BAEE4A100DBB3D0 /* Objective-Zip.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = "Objective-Zip.h"; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; + 8C59F3D91BAEE4A100DBB3D0 /* Objective-Zip+NSError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = "Objective-Zip+NSError.h"; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; + 8C59F3DA1BAEE4A100DBB3D0 /* OZFileInZipInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = OZFileInZipInfo.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; + 8C59F3DB1BAEE4A100DBB3D0 /* OZFileInZipInfo.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = OZFileInZipInfo.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; + 8C59F3DC1BAEE4A100DBB3D0 /* OZFileInZipInfo+Internals.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = "OZFileInZipInfo+Internals.h"; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; + 8C59F3DD1BAEE4A100DBB3D0 /* OZZipCompressionLevel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = OZZipCompressionLevel.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; + 8C59F3DE1BAEE4A100DBB3D0 /* OZZipException.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = OZZipException.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; + 8C59F3DF1BAEE4A100DBB3D0 /* OZZipException.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = OZZipException.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; + 8C59F3E01BAEE4A100DBB3D0 /* OZZipException+Internals.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = "OZZipException+Internals.h"; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; + 8C59F3E11BAEE4A100DBB3D0 /* OZZipFile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = OZZipFile.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; + 8C59F3E21BAEE4A100DBB3D0 /* OZZipFile.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = OZZipFile.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; + 8C59F3E31BAEE4A100DBB3D0 /* OZZipFile+NSError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = "OZZipFile+NSError.h"; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; + 8C59F3E41BAEE4A100DBB3D0 /* OZZipFile+Standard.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = "OZZipFile+Standard.h"; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; + 8C59F3E51BAEE4A100DBB3D0 /* OZZipFileMode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = OZZipFileMode.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; + 8C59F3E61BAEE4A100DBB3D0 /* OZZipReadStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = OZZipReadStream.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; + 8C59F3E71BAEE4A100DBB3D0 /* OZZipReadStream.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = OZZipReadStream.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; + 8C59F3E81BAEE4A100DBB3D0 /* OZZipReadStream+Internals.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = "OZZipReadStream+Internals.h"; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; + 8C59F3E91BAEE4A100DBB3D0 /* OZZipReadStream+NSError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = "OZZipReadStream+NSError.h"; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; + 8C59F3EA1BAEE4A100DBB3D0 /* OZZipReadStream+Standard.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = "OZZipReadStream+Standard.h"; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; + 8C59F3EB1BAEE4A100DBB3D0 /* OZZipWriteStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = OZZipWriteStream.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; + 8C59F3EC1BAEE4A100DBB3D0 /* OZZipWriteStream.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = OZZipWriteStream.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; + 8C59F3ED1BAEE4A100DBB3D0 /* OZZipWriteStream+Internals.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = "OZZipWriteStream+Internals.h"; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; + 8C59F3EE1BAEE4A100DBB3D0 /* OZZipWriteStream+NSError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = "OZZipWriteStream+NSError.h"; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; + 8C59F3EF1BAEE4A100DBB3D0 /* OZZipWriteStream+Standard.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = "OZZipWriteStream+Standard.h"; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; 8CC2FC581B91E63E00D5E05F /* libObjective-Zip.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libObjective-Zip.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 8CC2FC621B91E63E00D5E05F /* Objective-Zip Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Objective-Zip Tests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; 8CC2FC681B91E63E00D5E05F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 8CC2FC731B91E65200D5E05F /* libObjective-Zip_OS_X.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libObjective-Zip_OS_X.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 8CC2FC7D1B91E65200D5E05F /* Objective-Zip OS X Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Objective-Zip OS X Tests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; - 8CC2FCB81B91EB3500D5E05F /* ObjectiveZip_Tests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ObjectiveZip_Tests.m; path = "Objective-Zip Tests/ObjectiveZip_Tests.m"; sourceTree = SOURCE_ROOT; }; + 8CC2FCB81B91EB3500D5E05F /* ObjectiveZip_Tests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; name = ObjectiveZip_Tests.m; path = "Objective-Zip Tests/ObjectiveZip_Tests.m"; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ diff --git a/Objective-Zip/NSData+CRC32.h b/Objective-Zip/NSData+CRC32.h index 31556e0..1e84c1f 100644 --- a/Objective-Zip/NSData+CRC32.h +++ b/Objective-Zip/NSData+CRC32.h @@ -1,6 +1,6 @@ // // NSData+CRC32.h -// Objective-Zip v. 1.0.4 +// Objective-Zip v. 1.0.5 // // Created by Gianluca Bertani on 13/05/2017. // Copyright 2009-2017 Gianluca Bertani. All rights reserved. @@ -41,6 +41,7 @@ #pragma mark Handy CRC32 computation - (uint32_t) crc32; +- (uint32_t) crc32withInitialCrc32:(uint32_t)initialCrc32; @end diff --git a/Objective-Zip/NSData+CRC32.m b/Objective-Zip/NSData+CRC32.m index d5a9fe4..768c2a2 100644 --- a/Objective-Zip/NSData+CRC32.m +++ b/Objective-Zip/NSData+CRC32.m @@ -1,6 +1,6 @@ // // NSData+CRC32.m -// Objective-Zip v. 1.0.4 +// Objective-Zip v. 1.0.5 // // Created by Gianluca Bertani on 13/05/2017. // Copyright 2009-2017 Gianluca Bertani. All rights reserved. @@ -47,7 +47,11 @@ unsigned long crc32(unsigned long crc, const unsigned char *buf, unsigned int le #pragma mark Handy CRC32 computation - (uint32_t) crc32 { - return (uint32_t) crc32(0, [self bytes], (unsigned int) [self length]); + return [self crc32withInitialCrc32:0]; +} + +- (uint32_t) crc32withInitialCrc32:(uint32_t)initialCrc32 { + return (uint32_t) crc32(initialCrc32, [self bytes], (unsigned int) [self length]); } diff --git a/Objective-Zip/NSDate+DOSDate.h b/Objective-Zip/NSDate+DOSDate.h index d4d196b..dfc6c28 100644 --- a/Objective-Zip/NSDate+DOSDate.h +++ b/Objective-Zip/NSDate+DOSDate.h @@ -1,6 +1,6 @@ // // NSDate+DOSDate.h -// Objective-Zip v. 1.0.4 +// Objective-Zip v. 1.0.5 // // Created by Gianluca Bertani on 13/05/2017. // Copyright 2009-2017 Gianluca Bertani. All rights reserved. diff --git a/Objective-Zip/NSDate+DOSDate.m b/Objective-Zip/NSDate+DOSDate.m index f107ed5..9a9020b 100644 --- a/Objective-Zip/NSDate+DOSDate.m +++ b/Objective-Zip/NSDate+DOSDate.m @@ -1,6 +1,6 @@ // // NSDate+DOSDate.m -// Objective-Zip v. 1.0.4 +// Objective-Zip v. 1.0.5 // // Created by Gianluca Bertani on 13/05/2017. // Copyright 2009-2017 Gianluca Bertani. All rights reserved. diff --git a/Objective-Zip/OZFileInZipInfo+Internals.h b/Objective-Zip/OZFileInZipInfo+Internals.h index 5122d1a..2fbb6d1 100644 --- a/Objective-Zip/OZFileInZipInfo+Internals.h +++ b/Objective-Zip/OZFileInZipInfo+Internals.h @@ -1,6 +1,6 @@ // // OZFileInZipInfo+Internals.h -// Objective-Zip v. 1.0.4 +// Objective-Zip v. 1.0.5 // // Created by Gianluca Bertani on 27/08/15. // Copyright 2009-2017 Gianluca Bertani. All rights reserved. diff --git a/Objective-Zip/OZFileInZipInfo.h b/Objective-Zip/OZFileInZipInfo.h index 451780d..7fa9f85 100644 --- a/Objective-Zip/OZFileInZipInfo.h +++ b/Objective-Zip/OZFileInZipInfo.h @@ -1,6 +1,6 @@ // // OZFileInZipInfo.h -// Objective-Zip v. 1.0.4 +// Objective-Zip v. 1.0.5 // // Created by Gianluca Bertani on 27/12/09. // Copyright 2009-2017 Gianluca Bertani. All rights reserved. diff --git a/Objective-Zip/OZFileInZipInfo.m b/Objective-Zip/OZFileInZipInfo.m index 28c37eb..dc0c96c 100644 --- a/Objective-Zip/OZFileInZipInfo.m +++ b/Objective-Zip/OZFileInZipInfo.m @@ -1,6 +1,6 @@ // // OZFileInZipInfo.m -// Objective-Zip v. 1.0.4 +// Objective-Zip v. 1.0.5 // // Created by Gianluca Bertani on 27/12/09. // Copyright 2009-2017 Gianluca Bertani. All rights reserved. diff --git a/Objective-Zip/OZZipCompressionLevel.h b/Objective-Zip/OZZipCompressionLevel.h index c020137..cec1bdb 100644 --- a/Objective-Zip/OZZipCompressionLevel.h +++ b/Objective-Zip/OZZipCompressionLevel.h @@ -1,6 +1,6 @@ // // OZZipCompressionLevel.h -// Objective-Zip v. 1.0.4 +// Objective-Zip v. 1.0.5 // // Created by Gianluca Bertani on 27/08/15. // Copyright 2009-2017 Gianluca Bertani. All rights reserved. diff --git a/Objective-Zip/OZZipException+Internals.h b/Objective-Zip/OZZipException+Internals.h index a9643d7..1c7b70d 100644 --- a/Objective-Zip/OZZipException+Internals.h +++ b/Objective-Zip/OZZipException+Internals.h @@ -1,6 +1,6 @@ // // OZZipException+Internals.h -// Objective-Zip v. 1.0.4 +// Objective-Zip v. 1.0.5 // // Created by Gianluca Bertani on 27/08/15. // Copyright 2009-2017 Gianluca Bertani. All rights reserved. diff --git a/Objective-Zip/OZZipException.h b/Objective-Zip/OZZipException.h index 85610b6..80367b4 100644 --- a/Objective-Zip/OZZipException.h +++ b/Objective-Zip/OZZipException.h @@ -1,6 +1,6 @@ // // OZZipException.h -// Objective-Zip v. 1.0.4 +// Objective-Zip v. 1.0.5 // // Created by Gianluca Bertani on 25/12/09. // Copyright 2009-2017 Gianluca Bertani. All rights reserved. diff --git a/Objective-Zip/OZZipException.m b/Objective-Zip/OZZipException.m index 26655aa..e8c2b1c 100644 --- a/Objective-Zip/OZZipException.m +++ b/Objective-Zip/OZZipException.m @@ -1,6 +1,6 @@ // // OZZipException.m -// Objective-Zip v. 1.0.4 +// Objective-Zip v. 1.0.5 // // Created by Gianluca Bertani on 25/12/09. // Copyright 2009-2017 Gianluca Bertani. All rights reserved. diff --git a/Objective-Zip/OZZipFile+NSError.h b/Objective-Zip/OZZipFile+NSError.h index 388dd66..7e2cd06 100644 --- a/Objective-Zip/OZZipFile+NSError.h +++ b/Objective-Zip/OZZipFile+NSError.h @@ -1,6 +1,6 @@ // // OZZipFile+NSError.h -// Objective-Zip v. 1.0.4 +// Objective-Zip v. 1.0.5 // // Created by Gianluca Bertani on 09/09/15. // Copyright 2009-2017 Gianluca Bertani. All rights reserved. diff --git a/Objective-Zip/OZZipFile+Standard.h b/Objective-Zip/OZZipFile+Standard.h index 73f0011..fb3f349 100644 --- a/Objective-Zip/OZZipFile+Standard.h +++ b/Objective-Zip/OZZipFile+Standard.h @@ -1,6 +1,6 @@ // // OZZipFile+Standard.h -// Objective-Zip v. 1.0.4 +// Objective-Zip v. 1.0.5 // // Created by Gianluca Bertani on 09/09/15. // Copyright 2009-2017 Gianluca Bertani. All rights reserved. diff --git a/Objective-Zip/OZZipFile.h b/Objective-Zip/OZZipFile.h index 7e546f2..15c399e 100644 --- a/Objective-Zip/OZZipFile.h +++ b/Objective-Zip/OZZipFile.h @@ -1,6 +1,6 @@ // // OZZipFile.h -// Objective-Zip v. 1.0.4 +// Objective-Zip v. 1.0.5 // // Created by Gianluca Bertani on 25/12/09. // Copyright 2009-2017 Gianluca Bertani. All rights reserved. diff --git a/Objective-Zip/OZZipFile.m b/Objective-Zip/OZZipFile.m index 9ee5af2..f0a634e 100644 --- a/Objective-Zip/OZZipFile.m +++ b/Objective-Zip/OZZipFile.m @@ -1,6 +1,6 @@ // // OZZipFile.m -// Objective-Zip v. 1.0.4 +// Objective-Zip v. 1.0.5 // // Created by Gianluca Bertani on 25/12/09. // Copyright 2009-2017 Gianluca Bertani. All rights reserved. diff --git a/Objective-Zip/OZZipFileMode.h b/Objective-Zip/OZZipFileMode.h index 56d7831..2f89d1d 100644 --- a/Objective-Zip/OZZipFileMode.h +++ b/Objective-Zip/OZZipFileMode.h @@ -1,6 +1,6 @@ // // OZZipFileMode.h -// Objective-Zip v. 1.0.4 +// Objective-Zip v. 1.0.5 // // Created by Gianluca Bertani on 27/08/15. // Copyright 2009-2017 Gianluca Bertani. All rights reserved. diff --git a/Objective-Zip/OZZipReadStream+Internals.h b/Objective-Zip/OZZipReadStream+Internals.h index 08cbcf3..040372e 100644 --- a/Objective-Zip/OZZipReadStream+Internals.h +++ b/Objective-Zip/OZZipReadStream+Internals.h @@ -1,6 +1,6 @@ // // OZZipReadStream+Internals.h -// Objective-Zip v. 1.0.4 +// Objective-Zip v. 1.0.5 // // Created by Gianluca Bertani on 27/08/15. // Copyright 2009-2017 Gianluca Bertani. All rights reserved. diff --git a/Objective-Zip/OZZipReadStream+NSError.h b/Objective-Zip/OZZipReadStream+NSError.h index c1ac1ad..b297d0c 100644 --- a/Objective-Zip/OZZipReadStream+NSError.h +++ b/Objective-Zip/OZZipReadStream+NSError.h @@ -1,6 +1,6 @@ // // OZZipReadStream+NSError.h -// Objective-Zip v. 1.0.4 +// Objective-Zip v. 1.0.5 // // Created by Gianluca Bertani on 09/09/15. // Copyright 2009-2017 Gianluca Bertani. All rights reserved. diff --git a/Objective-Zip/OZZipReadStream+Standard.h b/Objective-Zip/OZZipReadStream+Standard.h index 6686c07..0ebafa5 100644 --- a/Objective-Zip/OZZipReadStream+Standard.h +++ b/Objective-Zip/OZZipReadStream+Standard.h @@ -1,6 +1,6 @@ // // OZZipReadStream+Standard.h -// Objective-Zip v. 1.0.4 +// Objective-Zip v. 1.0.5 // // Created by Gianluca Bertani on 09/09/15. // Copyright 2009-2017 Gianluca Bertani. All rights reserved. diff --git a/Objective-Zip/OZZipReadStream.h b/Objective-Zip/OZZipReadStream.h index 5bffc8d..2e8f871 100644 --- a/Objective-Zip/OZZipReadStream.h +++ b/Objective-Zip/OZZipReadStream.h @@ -1,6 +1,6 @@ // // OZZipReadStream.h -// Objective-Zip v. 1.0.4 +// Objective-Zip v. 1.0.5 // // Created by Gianluca Bertani on 28/12/09. // Copyright 2009-2017 Gianluca Bertani. All rights reserved. diff --git a/Objective-Zip/OZZipReadStream.m b/Objective-Zip/OZZipReadStream.m index c7e1ab5..f91fe9c 100644 --- a/Objective-Zip/OZZipReadStream.m +++ b/Objective-Zip/OZZipReadStream.m @@ -1,6 +1,6 @@ // // OZZipReadStream.m -// Objective-Zip v. 1.0.4 +// Objective-Zip v. 1.0.5 // // Created by Gianluca Bertani on 28/12/09. // Copyright 2009-2017 Gianluca Bertani. All rights reserved. diff --git a/Objective-Zip/OZZipWriteStream+Internals.h b/Objective-Zip/OZZipWriteStream+Internals.h index 7597d61..86d02ca 100644 --- a/Objective-Zip/OZZipWriteStream+Internals.h +++ b/Objective-Zip/OZZipWriteStream+Internals.h @@ -1,6 +1,6 @@ // // OZZipWriteStream+Internals.h -// Objective-Zip v. 1.0.4 +// Objective-Zip v. 1.0.5 // // Created by Gianluca Bertani on 27/08/15. // Copyright 2009-2017 Gianluca Bertani. All rights reserved. diff --git a/Objective-Zip/OZZipWriteStream+NSError.h b/Objective-Zip/OZZipWriteStream+NSError.h index 5f5ec8b..cfb55a4 100644 --- a/Objective-Zip/OZZipWriteStream+NSError.h +++ b/Objective-Zip/OZZipWriteStream+NSError.h @@ -1,6 +1,6 @@ // // OZZipWriteStream+NSError.h -// Objective-Zip v. 1.0.4 +// Objective-Zip v. 1.0.5 // // Created by Gianluca Bertani on 09/09/15. // Copyright 2009-2017 Gianluca Bertani. All rights reserved. diff --git a/Objective-Zip/OZZipWriteStream+Standard.h b/Objective-Zip/OZZipWriteStream+Standard.h index fd3cd84..36cbb35 100644 --- a/Objective-Zip/OZZipWriteStream+Standard.h +++ b/Objective-Zip/OZZipWriteStream+Standard.h @@ -1,6 +1,6 @@ // // OZZipWriteStream+Standard.h -// Objective-Zip v. 1.0.4 +// Objective-Zip v. 1.0.5 // // Created by Gianluca Bertani on 09/09/15. // Copyright 2009-2017 Gianluca Bertani. All rights reserved. diff --git a/Objective-Zip/OZZipWriteStream.h b/Objective-Zip/OZZipWriteStream.h index 6ad3220..d114e22 100644 --- a/Objective-Zip/OZZipWriteStream.h +++ b/Objective-Zip/OZZipWriteStream.h @@ -1,6 +1,6 @@ // // OZZipWriteStream.h -// Objective-Zip v. 1.0.4 +// Objective-Zip v. 1.0.5 // // Created by Gianluca Bertani on 25/12/09. // Copyright 2009-2017 Gianluca Bertani. All rights reserved. diff --git a/Objective-Zip/OZZipWriteStream.m b/Objective-Zip/OZZipWriteStream.m index 2b328df..262d454 100644 --- a/Objective-Zip/OZZipWriteStream.m +++ b/Objective-Zip/OZZipWriteStream.m @@ -1,6 +1,6 @@ // // OZZipWriteStream.m -// Objective-Zip v. 1.0.4 +// Objective-Zip v. 1.0.5 // // Created by Gianluca Bertani on 25/12/09. // Copyright 2009-2017 Gianluca Bertani. All rights reserved. diff --git a/Objective-Zip/Objective-Zip+NSError.h b/Objective-Zip/Objective-Zip+NSError.h index 4391a2f..505ab0c 100644 --- a/Objective-Zip/Objective-Zip+NSError.h +++ b/Objective-Zip/Objective-Zip+NSError.h @@ -1,6 +1,6 @@ // // Objective-Zip+NSError.h -// Objective-Zip v. 1.0.4 +// Objective-Zip v. 1.0.5 // // Created by Gianluca Bertani on 09/09/15. // Copyright 2009-2017 Gianluca Bertani. All rights reserved. diff --git a/Objective-Zip/Objective-Zip.h b/Objective-Zip/Objective-Zip.h index bb9e0eb..08a634b 100644 --- a/Objective-Zip/Objective-Zip.h +++ b/Objective-Zip/Objective-Zip.h @@ -1,6 +1,6 @@ // // Objective-Zip.h -// Objective-Zip v. 1.0.4 +// Objective-Zip v. 1.0.5 // // Created by Gianluca Bertani on 27/08/15. // Copyright 2009-2017 Gianluca Bertani. All rights reserved. diff --git a/README.md b/README.md index 1eca258..494c561 100644 --- a/README.md +++ b/README.md @@ -98,6 +98,55 @@ OZZipWriteStream *stream= [zipFile writeFileInZipWithName:@"abc.txt" ``` +Adding a file to a zip file using encryption +-------------------------------------------- + +Objective-Zip supports only traditional PKWare encryption, which is also the +format most widely supported by common unzip utilities. + +To add a file with encryption, it is necessary to precompute a CRC32 of +the file being added. This is needed by traditional PKWare encryption +to later verify that the password provided for decryption is correct. + +The library includes a handy crc32 method as an NSData category +(automatically imported under the umbrella header): + +```objective-c +NSData *fileData= // Your file data +uint32_t crc= [fileData crc32]; + +OZZipWriteStream *stream= [zipFile writeFileInZipWithName:@"abc.txt" + compressionLevel:OZZipCompressionLevelBest + password:@"password" + crc32:crc]; + +[stream writeData:fileData]; +[stream finishedWriting]; +``` + +Note that passing 0 (or any other non-CRC32 number) as the crc32 argument will make +the decryption fail, even if the correct password is specified. + +Note also that if your file is too large to be stored in a single NSData, you +can still compute the CRC32 progressively by using a loop: + +```objective-c +NSFileHandle *fileHandle= // Your file handle + +uint32_t crc= 0; +do { + + // Read a chunk of the file in data buffer + NSData *data= [fileHandle readDataOfLength:BUFFER_SIZE]; + if ([data length] == 0) + break; + + crc= [data crc32withInitialCrc32:crc]; + +} while (YES); +``` + + Reading a file from a zip file ------------------------------ @@ -279,6 +328,10 @@ The library is distributed under the New BSD License. Version history =============== +Version 1.0.5: + +- Improved support for computation of CRC32 + Version 1.0.4: - Updated to latest version of MiniZip (as of 13/5/2017) @@ -363,7 +416,7 @@ Version 0.7.0: Compatibility ============= -Version 1.0.3 has been tested with iOS up to 10.3 and OS X up to 10.12, but -should be compatible with earlier versions too, down to iOS 8.9 and OS X 10.7. +Version 1.0.5 has been tested with iOS up to 10.3 and OS X up to 10.12, but +should be compatible with earlier versions too, down to iOS 8.0 and OS X 10.7. Le me know of any issues that should arise. diff --git a/objective-zip.podspec b/objective-zip.podspec index 93effe1..b870941 100644 --- a/objective-zip.podspec +++ b/objective-zip.podspec @@ -3,7 +3,7 @@ Pod::Spec.new do |s| # ――― Spec Metadata ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # s.name = "objective-zip" - s.version = "1.0.4" + s.version = "1.0.5" s.summary = "An object-oriented friendly wrapper library for ZLib and MiniZip, in Objective-C for iOS and OS X" s.description = <<-DESC