Godzippa 2.0.0

Godzippa 2.0.0

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Mar 2018

Maintained by Mattt Thompson.


Downloads

Total1,407,133
Week0
Month37,081

Installs

Apps2,963
Test Targets427
Watch Apps9
powered by Segment

GitHub

Stars383
Watchers13
Forks47
Issues1
Contributors3
Pull Requests4

Code

Files5
LOCLines of Code 211


Godzippa 2.0.0

Godzippa!

gzip Compression / Decompression Category for NSData & NSFileManager

Example Usage

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!");

NSFileManager

NSFileManager *fileManager = [NSFileManager defaultManager];
NSURL *file = [NSURL fileURLWithPath:@"/path/to/file.txt"];
NSError *error = nil;

[fileManager GZipCompressFile:file
        writingContentsToFile:[file URLByAppendingPathExtension:@"gz"]
                        error:&error];

Requirements

  • zlib - In the "Link Binary With Libraries" Build Phase of your Target, add libz.dylib

Contact

Mattt (@mattt)

License

Godzippa! is available under the MIT license. See the LICENSE file for more info.