1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/NSData+gzip.m Wed Sep 02 08:41:25 2009 -0700
1.3 @@ -0,0 +1,24 @@
1.4 +//
1.5 +// NSData+gzip.m
1.6 +// Cloudy
1.7 +//
1.8 +// Created by Jens Alfke on 6/27/09.
1.9 +// Copyright 2009 Jens Alfke. All rights reserved.
1.10 +//
1.11 +
1.12 +#import "NSData+gzip.h"
1.13 +#import "GTMNSData+zlib.h"
1.14 +
1.15 +@implementation NSData (gzip)
1.16 +
1.17 +- (NSData*) my_gzippedWithCompression: (int)compression {
1.18 + return [NSData gtm_dataByGzippingBytes: self.bytes
1.19 + length: self.length
1.20 + compressionLevel: compression];
1.21 +}
1.22 +
1.23 +- (NSData*) my_gunzipped {
1.24 + return [NSData gtm_dataByInflatingBytes: self.bytes length: self.length];
1.25 +}
1.26 +
1.27 +@end