ZIP Foundation
Open Source Swift Library to Create ZIP archives
ZIP file is a compressed archive that makes it easier for users to reduce the size of large files or groups of files to send, share and store them with ease. The ZIP foundation is a Swift library that can effortlessly handle ZIP archive files. The library is based on Apple’s libcompression and handles encoding or decoding of compressed archives with ease. The library has included functionality for compression and decompression with high performance and stability. The library is open source and is available under the MIT license for public use.
The ZIP Foundation is a very easy to use and well-maintained documentation section. The Swift enables software developers to create, read and update ZIP archive files with just a couple of lines of code. The great thing about the library is that it has no 3rd party dependencies and provides easy to use high-level methods. The library has included several important features related to ZIP archives, such as zipping files or directories, access individual entries, create a new archive, access individual entries, add a new entry, remove a particular entry, better memory management, and so on.
Getting Started with ZIP Foundation
You can easily install ZIP Foundation from CocoaPods. Please use the following command for installing the project on your system.
Compile ZIP Foundation library via CocoaPods
$ pod install
You can easily install ZIP Foundation library from GitHub. Please use the following command for installing of the project on your system.
Install ZIP Foundation Library via GitHub
go get https://github.com/weichsel/ZIPFoundation.git
Zip Files & Directories via Swift Library
The open source ZIP Foundation library enables software developers to zip different kinds of files or directories using Swift code. For zipping a single file you just need to pass a file URL representing the item you want to zip and a destination URL. By default, no compression is used in archive creation. You can also create a compressed ZIP archive by setting the parameter to set to .deflate. Same like files it also accepts the directory items and adds the directory content to the archive with ease.
Add or Remove Individual Entries
It’s often required to access or read some specific entries in a ZIP archive with extracting the whole archive. The ZIP Foundation helps Software developers individually access specific entries and use them according to their own needs. It also facilitates programmers to incrementally update archive content. Programmers can easily add a new file to an existing archive or replace or delete a file in an existing ZIP archive with ease.
Process In-Memory Archives
The open source ZIP Foundation library has included support for handling in-memory archives using Swift commands. That means the library supports the creation or the extraction of the archives that only exist inside the RAM. You can easily read as well as update the in-memory archive with just a couple of lines of code. It also allows consuming ZIP entry contents without writing them to the file system.