Mum's the Word! - SKNZipArchiverMum’s the word! We are nearing a release date for our SKNZipArchiver, this will be a Zip file archiver framework for macOS and iOS. The good news is that we will be making the object code free for you to download, link and distribute in your applications!

You may wonder why I felt the need to create another means of handling Zip files on Apple’s platforms. Well, you just can’t have enough code in the world for extracting and creating Zip files. And no, it wasn’t just a technical exercise to fill my time; it was born out of the need to handle zips in another project that is also nearing completion.

What’s Wrong with Existing Zip Code?

Much of what is available as free to use and distribute is based on C code with perhaps an Obj-C wrapper, which is not exactly modern. Neither could I find anything that would work asynchronously and provide an NSProgress or adopts NSProgressReporting. Zip files downloaded from a network also lack efficiency with storage, i.e. you have to download the whole zip file before starting to extract files.

Goals for the SKNZipArchiver Framework

  • Utilise the OS wherever possible and not to have any dependency on third party code.
  • Be small and lightweight.
  • Implement asynchronous file handling.
  • Make use of multiple cores.
  • Utilise GCD QoS classes for trading performance against energy and user responsiveness.
  • Comprehensive error handling.
  • Simple and elegant API.
  • Minimise memory and temporary storage requirements whilst retaining good performance.

Compromises

To achieve this there are a few compromises… The Zip file specification has many features and compression methods; not all of them will be supported. There was also the time constraints to get something working as quickly as possible and with limited resources. Despite this, the framework handles any archive created on macOS and we continue to test with Zips from other sources.

Releases

The SKNZipArchiver will be released as a static library but wrapped in a conventional framework. Its binary is sufficiently fat which allows it to be used for testing in the simulator and linked for macOS and iOS platforms. The framework has been written purely in Obj-C with no dependencies on the Swift runtime. It has not yet been tested with Swift and we welcome any feedback.

We will also be releasing a basic open source macOS application that leverages the framework. The application demonstrates the use of the framework; combined with KVO it’s possible to create a surprisingly comprehensive application with very little code.

I look forward to receiving any feedback on its design and implementation.

Coming Soon… The SKNZipArchiver

Leave a Reply

Your email address will not be published. Required fields are marked *