Latest 0.6.0
Homepage https://github.com/WildDylan/DLZip
License MIT
Platforms ios 4.0, requires ARC
Authors

CI Status
Version
License
Platform

Usage

To run the example project, clone the repo, and run pod install from the Example directory first.

  • Zip files

    NSString * filePath = [[NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, YES) lastObject] stringByAppendingPathComponent:@"/Caches"];

    NSString * text = @"this is zip file with password pass_value";
     atomically:YES];

    // zip

    // zip with /Caches all Dictionary.

    // CREATE:

    //! @discussion create method, will create zipFile when call this method. !

    BOOL success = [DLZip createZipFileAtPath:[filePath stringByAppendingPathComponent:@"MyCreatedZip.zip"] withContentsOfDirectory:filePath keepParentDirectory:YES withPassword:@"pass_value"];

    if (success) {

        NSLog(@"create zip file success");
    } else {

        NSLog(@"create zip file failure");
    }
  • UnZip File

    [DLZip unzipFileAtPath:[[NSBundle mainBundle] pathForResource:@"TestPasswordArchive" ofType:@"zip"] toDestination:filePath overwrite:YES password:@"passw0rd" error:&error progressHandler:^(NSString *entry, unz_file_info zipInfo, long entryNumber, long total) {

        NSLog(@"entry : %@", entry);
        NSLog(@"zipInfo: %lu", zipInfo.size_file_comment);
        NSLog(@"entryNumber: %ld", entryNumber);
        NSLog(@"total: %ld", total);
    } completionHandler:^(NSString *path, BOOL succeeded, NSError *error) {

            NSLog(@"%@", path);

        if (succeeded) {

            NSLog(@"unzip success.");
        } else {

            NSLog(@"unzip failure.");
        }

        if (error) {

            NSLog(@"error = %@", error);
        }
    }];

Installation

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

    pod "DLZip"

Author

Dylan, [email protected]

License

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

Latest podspec

{
    "name": "DLZip",
    "version": "0.6.0",
    "summary": "DLZip. zip, unzip.",
    "description": "DLZip is easier for unzip .zipfile or zip files.",
    "homepage": "https://github.com/WildDylan/DLZip",
    "license": "MIT",
    "authors": {
        "Dylan": "[email protected]"
    },
    "source": {
        "git": "https://github.com/WildDylan/DLZip.git",
        "tag": "0.6.0"
    },
    "platforms": {
        "ios": "4.0"
    },
    "libraries": "z",
    "requires_arc": true,
    "source_files": "Pod/Classes/**/*"
}

Pin It on Pinterest

Share This