Giter Club home page Giter Club logo

monotouch-ziparchive's Introduction

Monotouch bindings for ZipArchive

This library allows you to easily compress files to an archive (.zip file) using MonoTouch. Other libraries are available but this is one of the simplest solutions.

You can get the ZipArchive code from their google code page.

Adding this lib to your project

  • Copy libziparchive.a and monotouch-ziparchive.dll to the root of your proj. You can copy it to another relative location but you'll have to modify the gcc_flags specified down below to match the paths.
  • In your MonoTouch project options > iPhone Build
    • Set Linker behavior to "Link SDK assemblies only"

    • Set the Extra arguments in all iPhone Build configurations to:

      -v -gcc_flags "-L${ProjectDir} -lziparchive -lz.1.2.3 -framework Foundation -force_load ${ProjectDir}/libziparchive.a"
      

      This includes build configs for Debug and Release versions of iPhone and iPhoneSimulator configs.

Usage

To zip files:

  var zipFile = new LibZipArchive.ZipArchive();
  zipFile.CreateZipFile2("/path/to/archive/file.zip");
  zipFile.AddFile("/path/of/file/to/compress.txt", "somefile.txt");
  // add more files as needed
  zipFile.CloseZipFile2();

To unzip files:

  var zipFile = new LibZipArchive.ZipArchive();
  zipFile.UnzipOpenFile("/path/to/archive/file.zip");
  zipFile.UnzipFileTo("/location/to/unarchive", true);
  zipFile.UnzipCloseFile();

monotouch-ziparchive's People

Contributors

ayoung avatar

Watchers

Sleiman Zublidi 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.