diff -r 000000000000 -r 5cab3034d3a1 NSData+gzip.m --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NSData+gzip.m Wed Sep 02 08:41:25 2009 -0700 @@ -0,0 +1,24 @@ +// +// NSData+gzip.m +// Cloudy +// +// Created by Jens Alfke on 6/27/09. +// Copyright 2009 Jens Alfke. All rights reserved. +// + +#import "NSData+gzip.h" +#import "GTMNSData+zlib.h" + +@implementation NSData (gzip) + +- (NSData*) my_gzippedWithCompression: (int)compression { + return [NSData gtm_dataByGzippingBytes: self.bytes + length: self.length + compressionLevel: compression]; +} + +- (NSData*) my_gunzipped { + return [NSData gtm_dataByInflatingBytes: self.bytes length: self.length]; +} + +@end