Latest 0.1.3
Homepage https://github.com/daltoniam/tarkit
License Apache License, Version 2.0
Platforms ios 5.0, osx 10.7, requires ARC
Authors

untar and tar files on iOS and OS X. Also supports gzip tars.

Example

Untar

NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString* dataPath = [[paths objectAtIndex:0] stringByAppendingPathComponent:@"test.tar.gz"];
NSString* toPath = [[paths objectAtIndex:0] stringByAppendingPathComponent:@"testDir"];
[DCTar decompressFileAtPath:dataPath toPath:toPath error:nil];

Tar

NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString* toPath = [[paths objectAtIndex:0] stringByAppendingPathComponent:@"test.tar.gz"];
NSString* dataPath = [[paths objectAtIndex:0] stringByAppendingPathComponent:@"testDir"];
[DCTar compressFileAtPath:dataPath toPath:toPath error:nil];

Discussion

It is important to know that all the file system based tar commands used chunked/buffer methods to save memory. Due to the fact that tars are normally used to compress lots of content, It is strongly recommend to use those method versus the in memory data options.

Credit

I got some of the tar code from here:

Install

The recommended approach for installing tarkit is via the CocoaPods package manager (like most libraries).

pod 'tarkit', '~> 0.1.3'

Requirements

tarkit requires at least iOS 5/OSX 10.7 or above.

License

tarkit is license under the Apache License.

Contact

Dalton Cherry

Latest podspec

{
    "name": "tarkit",
    "version": "0.1.3",
    "summary": "untar and tar files on iOS and OS X. Also supports gzip tars.",
    "homepage": "https://github.com/daltoniam/tarkit",
    "license": "Apache License, Version 2.0",
    "authors": {
        "Dalton Cherry": "[email protected]"
    },
    "source": {
        "git": "https://github.com/daltoniam/tarkit.git",
        "tag": "0.1.3"
    },
    "social_media_url": "http://twitter.com/daltoniam",
    "platforms": {
        "ios": "5.0",
        "osx": "10.7"
    },
    "source_files": "*.{h,m}",
    "requires_arc": true,
    "libraries": "z"
}

Pin It on Pinterest

Share This