gzip Compression / Decompression Category for NSData
NSData *originalData = [@"Look out! It's..." dataUsingEncoding:NSUTF8StringEncoding];
NSData *compressedData = [originalData dataByGZipCompressingWithError:nil];
NSData *decompressedData = [compressedData dataByGZipDecompressingDataWithError:nil];
NSLog(@"%@ %@", [NSString stringWithUTF8String:[decompressedData bytes]], @"Godzippa!");
- zlib - In the "Link Binary With Libraries" Build Phase of your Target, add
libz.dylib
Mattt Thompson
Godzippa! is available under the MIT license. See the LICENSE file for more info.