SSZipArchiveの詳細な使用



Detailed Use Ssziparchive



Githubダウンロードアドレス

SSZipArchive関数:
zipファイルを解凍します
パスワードで保護されたzipファイルを解凍します
zipファイルを作成する
zipファイルに追加
圧縮ファイル
名前を使用してNSDataを圧縮します



使用前:
SSZipArchiveファイルをプロジェクトに追加します
libz.dylibをターゲットに追加します

// Unzip NSString *zipPath = @'decompressed file path' NSString *destinationPath = @'Extracted to the directory' [SSZipArchive unzipFileAtPath:zipPath toDestination:destinationPath] // compression NSString *zippedPath = @'compressed file path' NSArray *inputPaths = [NSArray arrayWithObjects: [[NSBundle mainBundle] pathForResource:@'photo1' ofType:@'jpg'], [[NSBundle mainBundle] pathForResource:@'photo2' ofType:@'jpg'] nil nil] [SSZipArchive createZipFileAtPath:zippedPath withFilesAtPaths:inputPaths]

出典:http://blog.csdn.net/kqygww/article/details/24851877