views:

574

answers:

3

Is there a class that allows to compress data with zlib, or the only possibility is to use directly zlib.dylib?

+3  A: 

This, maybe: http://www.clintharris.net/2009/how-to-gzip-data-in-memory-using-objective-c/

The MYYN
Thank you. It contains the code that I actually need. I don't see the part to save the data in a file, but that is not difficult to write.
kiamlaluno
+2  A: 

http://www.cocoadev.com/index.pl?NSDataCategory Here is easy to use NSData category implementation. Usage:

NSData* compressed = [myData zlibDeflate];
NSData* originalData = [compressed zlibInflate];
vaddieg
The code I found in the link you reported is more complete, as it includes also the part to calculate the CRC32 checksum.
kiamlaluno
A: 

I was searching for a way to decompress gzip files... this NSData class is really something Thanks