{"id":13748200,"url":"https://github.com/tidev/ti.compression","last_synced_at":"2025-06-13T04:38:11.996Z","repository":{"id":19482095,"uuid":"22727789","full_name":"tidev/ti.compression","owner":"tidev","description":"Compress your files to reduce storage","archived":false,"fork":false,"pushed_at":"2024-03-06T21:43:56.000Z","size":6914,"stargazers_count":29,"open_issues_count":34,"forks_count":20,"subscribers_count":22,"default_branch":"master","last_synced_at":"2025-06-02T15:17:57.933Z","etag":null,"topics":["titanium-module"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tidev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"tidev","liberapay":"tidev"}},"created_at":"2014-08-07T16:15:52.000Z","updated_at":"2023-02-11T13:04:32.000Z","dependencies_parsed_at":"2024-01-17T13:12:04.483Z","dependency_job_id":"36c41bab-bd54-42b2-bb3b-88109ac05a57","html_url":"https://github.com/tidev/ti.compression","commit_stats":null,"previous_names":["appcelerator-modules/ti.compression"],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/tidev/ti.compression","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tidev%2Fti.compression","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tidev%2Fti.compression/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tidev%2Fti.compression/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tidev%2Fti.compression/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tidev","download_url":"https://codeload.github.com/tidev/ti.compression/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tidev%2Fti.compression/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259582794,"owners_count":22880090,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["titanium-module"],"created_at":"2024-08-03T07:00:36.850Z","updated_at":"2025-06-13T04:38:11.951Z","avatar_url":"https://github.com/tidev.png","language":"C","readme":"# Ti.Compression Module\n\n## Description\n\nLets you zip and unzip files.\n\n## Getting Started\n\nView the [Using Titanium Modules](http://docs.appcelerator.com/platform/latest/#!/guide/Using_Titanium_Modules) document for instructions on getting\nstarted with using this module in your application.\n\n## Accessing the Ti.Compression Module\n\nTo access this module from JavaScript, you would do the following:\n\n```js\nvar Compression = require('ti.compression');\n```\n\n## Functions\n\n### string zip(string archiveFile, string[] fileArray)\n\nCompresses all of the files you pass in \"fileArray\" to the specified \"archiveFile\".\n\n#### Arguments\n\n* string archiveFile: The path to the archive file to create\n* string[] fileArray: An array of files to compress\n\nReturns the string \"success\" if the operation succeeded, or an error message if something went wrong.\n\n### string unzip(string destinationFolder, string archiveFile, bool overwrite)\n\nExtracts the files in the archive file into the destination folder, optionally overriding existing files.\n\n#### Arguments\n\n* string destinationFolder: The destination folder for the extracted files\n* string archiveFile: The path to an existing compressed archive file\n* bool overwrite: Indicates if existing files should be overwritten\n\nReturns the string \"success\" if the operation succeeded, or an error message if something went wrong.\n\n## Usage\n\nTo create an archive:  \n\n```js\nvar result = Ti.Compression.zip('test.zip', [ 'a.dat', 'b.dat', 'c.dat' ];\n```\n\nTo extract an archive:\n\n```js\nvar result = Ti.Compression.unzip(Ti.Filesystem.applicationDataDirectory + 'data', 'test.zip', true);\n```\n\n\nSee example for more details.\n\n## zip Parameter\n\nAndroid:\n* filename:String, files:Array, options: Object [compression: Compression.BEST_SPEED | Compression.DEFAULT_COMPRESSION | Compression.NO_COMPRESSION]\n\niOS:\n* filename:String, files:Array\n\n## Create demo files\n\nCreate demo files\n\ngood compression (no content)\n```bash\ntruncate -s 5M file1.dat\n```\n\nBad compression (random content)\n```bash\ndd if=/dev/urandom of=file1 bs=5M count=1\n```\n\n## Author\n\nClint Tredway\n\n## License\n\nCopyright(c) 2010-present by Axway Appcelerator. All Rights Reserved. Please see the LICENSE file included in the distribution for further details.\n","funding_links":["https://github.com/sponsors/tidev","https://liberapay.com/tidev"],"categories":["C"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftidev%2Fti.compression","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftidev%2Fti.compression","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftidev%2Fti.compression/lists"}