Flora
Flora

Reputation: 309

How to compress multiple files with iOS Compression Framework?

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

Answers (1)

Thomas Zoechling
Thomas Zoechling

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

Related Questions