Zip Files in Objective-C?
Zip Files in Objective-C?
- Subject: Zip Files in Objective-C?
- From: Karl Moskowski <email@hidden>
- Date: Mon, 28 Apr 2008 12:13:24 -0400
Going through the list archives, I've found that the topic of creating
and using zip files in a Cocoa app has come up a few times over the
years.
A frequently-mentioned approach is to use NSTask wrapped around a
command-line tool such as ditto or zip/unzip. However, besides the
concern about the tools not being installed since they're part of the
BSD Subsystem (is this a concern on Leopard, BTW? IIRC, the BSD
subsystem is no longer optional), the overhead of spawning a task is
sub-optimal. Another approach is to use Zlib directly. However, since
it only does single-file compression and doesn't handle folder
recursion or archive creation, it requires some possibly significant
wrapper code. A third approach is to use Minizip <http://www.winimage.com/zLibDll/minizip.html
>, a C-based wrapper around Zlib that does all the archive-related
stuff.
I'm leaning towards Minizip and writing an ObjC wrapper around some of
its functions. I did see some old posts about people having done this,
and there is a note at <http://www.cocoadev.com/index.pl?ZipArchiveLibraryForCocoa
> where someone made such a wrapper available, but the link appears
to be dead.
Does anyone have any suggestions or examples for doing this in a
Leopard-only application? Thanks.
----
Karl Moskowski <email@hidden>
Voodoo Ergonomics Inc. <http://voodooergonomics.com/>
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden