Reputation: 309
How can I compress multiple files into one .zlib
compressed file using only the native Compression Framework?
I would like to achieve what can be done using external libraries for .zip
files, in which you give them a directory and they create a .zip
archive with all the files in the directory.
Upvotes: 3
Views: 4254
Reputation: 34243
ZIP Foundation uses the native Compression framework.
If you don't need the ZIP functionality, you can have a look at the Data+Compression.swift
extension. It contains the compression and decompression methods that implement stream based, zlib compatible encoding/decoding.
Upvotes: 3