Giter Club home page Giter Club logo

darling0825 / archiveunarchiveinios_zip_rar Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ceekay1991/iosziprarutil

0.0 0.0 0.0 152 KB

一、BDCompressUtil简介 BDCompressUtil 集成的第三方库 UnrarKit---rar解压缩 SSZipArchive----zip解压缩、压缩(扩展密码判断、密码正确性判断) ZipZap----zip解压缩、压缩 unchardet---编码解析 1、rar文件解压缩 2、zip文件解压缩 3、判断压缩文件是否有密码 4、校验密码的正确性 5、将压缩文件重新压缩为zip完美解决iOS7和iOS8对zip文件预览支持的差异性 6、解压、压缩文件名编码解析 6、解压、压缩文本文件重新编码支持ios系统的预览 二、BDCompressUtil 使用步骤 1、将Class下的文件添加到工程目录 2、添加系统库 MobileCoreService.framework Foundation.framework ImageIO.framework CoreGraphics.framework UIKit.framework SystemConfiguration.framework libz.dylib QuickLook.framework 3、buildsettings 配置 Other Link Flags 增加如下2项 -lc++ -force_load UnrarKit/libUnrarKit.a 4.代码调用 解压缩: dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ [BDCompressUtil unCompressWitthSourcePath:源文件 andDestenationPath:输出目录文件夹 andFinish:^(NSString *filePath) { dispatch_async(dispatch_get_main_queue(), ^{ NSLog(@"unCompressFile 输出目录:%@",filePath); }); }]; }); 压缩: dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ [BDCompressUtil reCompressToZIPWitthSourcePath:filePath andDestenationPath:ArchiveUnArchiveViewControllerOutPath andFinish:^(NSString *filePath){ dispatch_async(dispatch_get_main_queue(), ^{ NSLog(@"recompress2zip 输出目录:%@",filePath); }); }]; }); 三、备注 FileBrowser代码为githugb: https://github.com/dai-jing/FileBrowser

archiveunarchiveinios_zip_rar's People

Contributors

ceekay1991 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.