Giter VIP home page Giter VIP logo

iosziprarutil's Introduction

ArchiveUnArchiveIniOS_zip_rar

一、ArchiveUnArchiveIniOS_zip_rar简介


ArchiveUnArchiveIniOS_zip_rar 集成的第三方库

  • UnrarKit---rar解压缩;
  • SSZipArchive----zip解压缩、压缩(扩展密码判断、密码正确性判断);
  • ZipZap----zip解压缩、压缩;
  • unchardet---编码解析。

ArchiveUnArchiveIniOS_zip_rar 支持的功能

  • 1、rar文件解压缩;
  • 2、zip文件解压缩;
  • 3、判断压缩文件是否有密码;
  • 4、校验密码的正确性;
  • 5、将压缩文件重新压缩为zip完美解决iOS7和iOS8对zip文件预览支持的差异性;
  • 6、解压、压缩文件名编码解析;
  • 6、解压、压缩文本文件重新编码支持ios系统的预览;

二、ArchiveUnArchiveIniOS_zip_rar 使用步骤


  • 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

四 截图


image image image

iosziprarutil's People

Contributors

ceekay1991 avatar

Stargazers

amadman avatar  avatar  avatar  avatar azure avatar  avatar 西门桃桃 avatar 颜闽辉 avatar denny avatar onion avatar WhoJave avatar  avatar  avatar Mino avatar  avatar Mediocrity avatar colin3dmax avatar ig avatar

Watchers

James Cloos avatar  avatar  avatar azure avatar  avatar  avatar

iosziprarutil's Issues

Example doesn't work on iPhone 6

ld: warning: object file (/Users/gerchicov/Documents/xCode_projects/iOS_ZIP_RAR_compressionAndDecompression/ArchiveUnArchiveIniOS/ThirdParty/UnrarKit/libUnrarKit.a(rar.o)) was built for newer iOS version (7.1) than being linked (7.0)
ld: '/Users/gerchicov/Documents/xCode_projects/iOS_ZIP_RAR_compressionAndDecompression/ArchiveUnArchiveIniOS/ThirdParty/UnrarKit/libUnrarKit.a(rar.o)' does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

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.