pixelglow / ZipZap

zip file I/O library for iOS, macOS and tvOS
BSD 2-Clause "Simplified" License
1.22k stars 199 forks source link

No High Level APIs for Most Probable Use Cases #157

Open levigroker opened 7 years ago

levigroker commented 7 years ago

Hi There,

As far as I can tell, and please correct me if I'm wrong, there are no high level APIs to perform the most probable use cases for a zip library, such as compress the file/directory found at a URL, decompress a given file URL or chunk of data.

Something along the lines of:

- (void)compressURL:(NSURL *)sourceURL destURL:(NSURL *)destURL completion:(void(^)(NSURL *outURL, NSError *error))completion;

- (void)compressURL:(NSURL *)sourceURL completion:(void(^)(NSData *compressedData, NSError *error))completion;

- (void)decompressFileURL:(NSURL *)compressedFile toDirectory:(NSURL *)destURL overwriting:(BOOL)overwriting completion:(void(^)(NSURL *outURL, NSError *error))completion;

- (void)decompressData:(NSData *)compressedData toDirectory:(NSURL *)destURL overwriting:(BOOL)overwriting completion:(void(^)(NSURL *outURL, NSError *error))completion;

This seems like an intentional omission.

Would you entertain a pull request with some high level API like this?

levigroker commented 7 years ago

I have implemented this for my project and would appreciate understanding if such a pull request would be entertained.

mickeyl commented 6 years ago

Could you create a pull request, please?

levigroker commented 6 years ago

Ok. Will do.