Giter Site home page Giter Site logo

fasihul-haque / ti.compression Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tidev/ti.compression

0.0 0.0 0.0 1.39 MB

Compress your files to reduce storage

License: Other

JavaScript 7.05% Java 3.79% Objective-C 5.10% Objective-C++ 4.44% C 70.86% C++ 8.76%

ti.compression's Introduction

Ti.Compression Module

Description

Lets you zip and unzip files.

Getting Started

View the Using Titanium Modules document for instructions on getting started with using this module in your application.

Accessing the Ti.Compression Module

To access this module from JavaScript, you would do the following:

var Compression = require('ti.compression');

Functions

string zip(string archiveFile, string[] fileArray)

Compresses all of the files you pass in "fileArray" to the specified "archiveFile".

Arguments

  • string archiveFile: The path to the archive file to create
  • string[] fileArray: An array of files to compress

Returns the string "success" if the operation succeeded, or an error message if something went wrong.

string unzip(string destinationFolder, string archiveFile, bool overwrite)

Extracts the files in the archive file into the destination folder, optionally overriding existing files.

Arguments

  • string destinationFolder: The destination folder for the extracted files
  • string archiveFile: The path to an existing compressed archive file
  • bool overwrite: Indicates if existing files should be overwritten

Returns the string "success" if the operation succeeded, or an error message if something went wrong.

Usage

To create an archive:

var result = Ti.Compression.zip('test.zip', [ 'a.dat', 'b.dat', 'c.dat' ];

To extract an archive:

var result = Ti.Compression.unzip(Ti.Filesystem.applicationDataDirectory + 'data', 'test.zip', true);

See example for more details.

Author

Clint Tredway

Feedback and Support

Please direct all questions, feedback, and concerns to [email protected].

License

Copyright(c) 2010-present by Axway Appcelerator. All Rights Reserved. Please see the LICENSE file included in the distribution for further details.

ti.compression's People

Contributors

ashcoding avatar garymathews avatar hansemannn avatar ingo avatar janvennemann avatar jawa9000 avatar jonalter avatar m1ga avatar muhammaddadu avatar pec1985 avatar sgtcoolguy avatar ssjsamir avatar stephenfeather avatar yomybaby avatar ypbnv 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.