0

I have a decent problem with programming my iOS App. I receive a base64 string from a webservice. The data provided by the string is binary data which includes a zlib zipped json format array. I dont know why but i cannot unzip this data. All trys of putting the string into a NSData object and unzip it with the zlib's inflate method didnt work.. The "decompressed" object had a length (and size of bytes) of 0 (nil) all the time and I dont know why...

Im becoming despaired about this.. I almost all the google entrys about this topic but nothing helped.

Does someone dealt with that kind of problem anytime? Hope for your help guys, thanks.

Rob (im using xcode5)

Rob
  • 3
  • 2

1 Answers1

0

inflate is for undoing deflate, and deals with a single stream of compressed data, unlike the structured archives of zip. As far as I know, Apple's zlib does not include zip/unzip functions. You may need to download the source from zlib.org. Look for the "minizip" files in the contributed folder.

See this question for info on deflate/inflate compared to gzip.

Community
  • 1
  • 1
JWWalker
  • 22,385
  • 6
  • 55
  • 76
  • Oh seriously? Why is there another function for gunzip then? Well ill have a try with the other lib from zlib.org – Rob Jul 11 '14 at 16:21