• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Question about zipping files
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Question about zipping files


  • Subject: Re: Question about zipping files
  • From: Greg Guerin <email@hidden>
  • Date: Mon, 15 Feb 2010 10:05:07 -0700

Gideon King wrote:

1. Use NSTask to create a zip file, passing in as arguments all the filenames to zip. My question about this would be whether I would run into any restrictions with the length of the command which well be beyond the old 1024 character limits (not sure if any command line argument limits are still extant). I would think this would be the most efficient way to do it (both time and memory/storage wise), so long as there are no limitations on command line length.

Max argv size is defined by sysctl kern.argmax. It's at least 256K these days. I don't think it was ever as low as 1024.


Most archive tools have an option that tells them to read file-lists from stdin, one pathname per line.

If the archive format doesn't have to be pkzip, then consider using tar and gzip.

You could hard-link selected files into a temp-folder rather than copying them. Then unlink when you're done and no copies needed. You can't hard-link symlinks, though, so that may not work. However, pkzip has no encoding for symlinks, so you can't zip a symlink, anyway. Or are you using ditto to write the zip file?

  -- GG

_______________________________________________

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


  • Prev by Date: problem with distributed objects
  • Next by Date: Re: GeekGameBoard (was: Re: Touch-and-drag architecture question)
  • Previous by thread: Re: Question about zipping files
  • Next by thread: NSDrawNinePartImage not working ?
  • Index(es):
    • Date
    • Thread