ZipZap
ZipZap copied to clipboard
Does zipzap support progress callback?
Hey guys,
Does zipzap or will support the progress callback via delegate, block or something?
It would be OK for UI
Thanks
We currently don't report progress, as zipzap is a synchronous API. It doesn't use threads or other asynchronous methods beneath the surface, and all work is done when the call returns. This generally makes it easier to reason about.
That being said, the API will work from a different, non-UI thread provided the objects are created and used in that thread. Thus it does make sense to implement a progress callback -- did you only want a callback for -[ZZMutableArchive updateEntries:error:]
? Can you limit this to iOS 7 or OS X 10.9 and later, I can use NSProgress
then?
I can’t limit the usage only for iOS 7 and OS X 10.9 now,
Do you have a plan that make thing done?
Best Regards,
Kevin Chen
On Apr 4, 2014, at 1:56 PM, Glen Low [email protected] wrote:
We currently don't report progress, as zipzap is a synchronous API. It doesn't use threads or other asynchronous methods beneath the surface, and all work is done when the call returns.
That being said, the API will work from a different, non-UI thread provided the objects are created and used in that thread. Thus it does make sense to implement a progress callback -- did you only want a callback for -[ZZMutableArchive updateEntries:error:]? Can you limit this to iOS 7 or OS X 10.9 and later, I can use NSProgress then?
— Reply to this email directly or view it on GitHub.
I had a good look at NSProgress
and since the API is so compelling and likely to be well-supported by Apple and third parties going forward, it is likely we will use that API instead of any custom callback scheme. Thus the official client will offer progress callback via NSProgress
when built for iOS 7 and OS X 10.9.
If you cannot limit usage to iOS 7 and OS X 10.9, you can write a minimal NSProgress
shim to get this functionality. Let me know what you think.
@pixelglow do you have any recommendations/best practices for reading (extracting) a ZZArchive
asynchronously?
Obviously I could just use GCD. Just wondering your thoughts.
@RLovelett please raise a new issue for this, thanks.
@pixelglow , have you already implemented the progress callback now? -[ZZMutableArchive updateEntries:error:] cannot be used for NSProgress
@pixelglow Also wondering if NSProgress is implemented? I didn't see it in the API.