Skip to content

ReDetection/NVHGzipFile

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NVHGzipFile

This is an ObjC library for gzipping/ungzipping that directly manipulates files. It isn't implemented as a category on NSData (unlike GZIP or Godzippa) so the full file doesn't have to be first loaded into memory.

Version 1.1.1 is the latest supporting iOS 7.

Usage

Asynchronous

Extract Gzip file

    [[[NVHGzipFile alloc]
        initWithPath:gzipFilePath]
        inflateToPath:destinationFilePath completion:^(NSError *error) {
            [self completeActionWithError:error];
        }];

Gzip file

    [[[NVHGzipFile alloc]
        initWithPath:sourceFilePath]
        deflateFromPath:destinationGzipFilePath completion:^(NSError *error) {
            [self completeActionWithError:error];
        }];

Synchronous

Extract Gzip file

    NSError *error = nil;
    BOOL success = [[[NVHGzipFile alloc]
        initWithPath:gzipFilePath]
        inflateToPath:destinationFilePath error:&error];

Gzip file

    NSError *error = nil;
    BOOL success = [[[NVHGzipFile alloc]
        initWithPath:sourceFilePath]
        deflateFromPath:destinationGzipFilePath error:&error];

Installation

NVHGzipFile is available through CocoaPods, to install it simply add the following line to your Podfile:

pod "NVHGzipFile", :git => 'https://github.com/ReDetection/NVHGzipFile.git'

Author

Niels van Hoorn, nvh@nvh.io

ReDetection just cutted out everyithing except gzip

Pull requests are welcome!

License

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

About

Just a simple Gzip handling for iOS6+

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Objective-C 74.6%
  • Ruby 25.4%