• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

ZipArchive/ZipArchive: ZipArchive is a simple utility class for zipping and unzi ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

ZipArchive/ZipArchive

开源软件地址(OpenSource Url):

https://github.com/ZipArchive/ZipArchive

开源编程语言(OpenSource Language):

C 74.4%

开源软件介绍(OpenSource Introduction):

CI

SSZipArchive

ZipArchive is a simple utility class for zipping and unzipping files on iOS, macOS and tvOS.

  • Unzip zip files;
  • Unzip password protected zip files;
  • Unzip AES encrypted zip files;
  • Create zip files;
  • Create large (> 4.3Gb) files;
  • Create password protected zip files;
  • Create AES encrypted zip files;
  • Choose compression level;
  • Zip-up NSData instances. (with a filename)

Version 2.5.0+ Updates Minimum OS Versions

A key dependency of this project is the zlib library. zlib before version 1.2.12 allows memory corruption when deflating (i.e., when compressing) if the input has many distant matches according to CVE-2018-25032.

zlib 1.2.12 is included in macOS 10.15+ (with latest security patches), iOS 15.5+, tvOS 15.4+, watchOS 8.4+. As such, these OS versions will be the new minimums as of version 2.5.0 of ZipArchive.

If you need support for previous versions of ZipArchive for earlier OS support you can target an earlier version but know you will be using an unmaintained version of this library.

We will not support versions of ZipArchive that use dependencies with known vulnerabilities.

Installation and Setup

The main release branch is configured to support Objective-C and Swift 4+.

SSZipArchive works on Xcode 12 and above, iOS 15.5 and above, tvOS 15.4 and above, macOS 10.15 and above, watchOS 8.4 and above.

CocoaPods

In your Podfile:
pod 'SSZipArchive'

You should define your minimum deployment target explicitly, like: platform :ios, '15.5'

Recommended CocoaPods version should be at least CocoaPods 1.7.5.

SPM

Add a Swift Package reference to https://github.com/ZipArchive/ZipArchive.git (SSZipArchive 2.4.2 and higher or master)

Carthage

In your Cartfile:
github "ZipArchive/ZipArchive"

We do not release a Carthage pre-built package. Developers are encouraged to build one themselves.

Manual

  1. Add the SSZipArchive and minizip folders to your project.
  2. Add the libz and libiconv libraries to your target.
  3. Add the Security framework to your target.
  4. Add the following GCC_PREPROCESSOR_DEFINITIONS: HAVE_INTTYPES_H HAVE_PKCRYPT HAVE_STDINT_H HAVE_WZAES HAVE_ZLIB ZLIB_COMPAT $(inherited).

SSZipArchive requires ARC.

Usage

Objective-C

//Import "#import <ZipArchive.h>" for SPM/Carthage, and "#import <SSZipArchive.h>" for CocoaPods.

// Create
[SSZipArchive createZipFileAtPath:zipPath withContentsOfDirectory:sampleDataPath];

// Unzip
[SSZipArchive unzipFileAtPath:zipPath toDestination:unzipPath];

Swift

//Import "import ZipArchive" for SPM/Carthage, and "import SSZipArchive" for CocoaPods.

// Create
SSZipArchive.createZipFileAtPath(zipPath, withContentsOfDirectory: sampleDataPath)

// Unzip
SSZipArchive.unzipFileAtPath(zipPath, toDestination: unzipPath)

License

SSZipArchive is protected under the MIT license and our slightly modified version of minizip-ng (formally minizip) 3.0.6 is licensed under the Zlib license.

Acknowledgments

  • Big thanks to aish for creating ZipArchive. The project that inspired SSZipArchive.
  • Thank you @soffes for the actual name of SSZipArchive.
  • Thank you @randomsequence for implementing the creation support tech.
  • Thank you @johnezang for all his amazing help along the way.
  • Thank you @nmoinvaz for minizip-ng (formally minizip), the core of ZipArchive.
  • Thank you to all the contributors.



鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap