ios中對檔案的解壓縮處理通常都是利用第三方框架,實現解壓縮,接下來就來看看吧。
使用步驟
// 解壓檔案
nsstring *zippath = @"path_to_your_zip_file";
nsstring *destinationpath = @"path_to_the_folder_where_you_want_it_unzipped";
/*第乙個引數: 需要解壓縮的檔案
第二個引數: 解壓縮之後放到什麼地方
*/[main unzipfileatpath:zippath todestination:destinationpath];
// 壓縮檔案
/*打包乙個檔案, 壓縮乙個檔案
第乙個引數: 壓縮檔案的儲存位置
第二個引數: 需要壓縮的檔案
*/[main createzipfileatpath:zippedpath
withfilesatpaths:inputpaths];
// zip directory
[main createzipfileatpath:zippedpath
withcontentsofdirectory:inputpaths];
檔案的壓縮和解壓縮
import ssziparchive.h 方法一 第乙個引數 壓縮檔案的存放位置 第二個引數 要壓縮那些檔案 路徑 這裡面是乙個陣列,陣列當中都是我們需要壓縮檔案路徑 建立陣列nsarray arraym ssziparchive createzipfileatpath test.zip with...
檔案的壓縮和解壓縮
1 說明 使用ziparchive來壓縮和解壓縮檔案需要新增依賴庫 libz 使用需要包含ssziparchive檔案,如果使用cocoapoads來安裝框架,那麼會自動的配置框架的使用環境 2 相關 壓縮檔案的第一種方式 第乙個引數 壓縮檔案要儲存的位置 第二個引數 要壓縮哪幾個檔案 sszipa...
Linux檔案壓縮和解壓縮
壓縮 tar 引數 生成的壓縮包的名字 要壓縮的檔案 檔案 目錄 引數 c 生成壓縮檔案 z 使用gzip的方式進行壓縮 j 使用bzip2壓縮 v 顯示壓縮資訊 可以省略 f 指定壓縮包名 壓縮包名 隨便指定,字尾需要自己指定 如果壓縮使用gzip,引數就是 z,包名 tar.gz 如果壓縮使用b...