{"id":13485096,"url":"https://github.com/moncefplastin07/deno-zip","last_synced_at":"2025-08-14T23:31:16.482Z","repository":{"id":42018144,"uuid":"300945147","full_name":"moncefplastin07/deno-zip","owner":"moncefplastin07","description":"Streaming cross-platform zip tool written for Deno 🦕.","archived":false,"fork":false,"pushed_at":"2023-02-23T16:22:44.000Z","size":83,"stargazers_count":20,"open_issues_count":3,"forks_count":15,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-11-18T15:15:44.691Z","etag":null,"topics":["deno"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/moncefplastin07.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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}},"created_at":"2020-10-03T18:06:44.000Z","updated_at":"2024-11-15T10:18:56.000Z","dependencies_parsed_at":"2024-01-16T07:22:06.309Z","dependency_job_id":null,"html_url":"https://github.com/moncefplastin07/deno-zip","commit_stats":{"total_commits":37,"total_committers":6,"mean_commits":6.166666666666667,"dds":"0.18918918918918914","last_synced_commit":"501dd997a4d67ee28f3ba54b017eb462ed548bf8"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moncefplastin07%2Fdeno-zip","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moncefplastin07%2Fdeno-zip/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moncefplastin07%2Fdeno-zip/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moncefplastin07%2Fdeno-zip/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/moncefplastin07","download_url":"https://codeload.github.com/moncefplastin07/deno-zip/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229875380,"owners_count":18137800,"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":["deno"],"created_at":"2024-07-31T17:01:45.751Z","updated_at":"2024-12-15T21:13:21.956Z","avatar_url":"https://github.com/moncefplastin07.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# Deno Zip archive\n\nStreaming cross-platform zip tool written for Deno 🦕.\n\n### the module require permision below\n\n- **--allow-run**: for running unzipping command in command prompt\n- **--allow-read**: check the existence of the file before starting the\n  decompression process.\n\n### import the module in your deno app\n\n```js\nimport {\n  compress,\n  decompress\n} from \"https://deno.land/x/zip@v1.2.5/mod.ts\";\n```\n\n\n#### Usage:\n### Compressing\nCompress files and folders to zip file with ``compress`` method\naddin: v1.2.0\n```js\ninterface CompressOptions {\n  overwrite?: boolean;\n}\ncompress(files:string | string[],\n  archiveName: string = \"./archive.zip\",\n  options?: CompressOptions):Promise\u003cboolean\u003e\ndecompress(filePath:string, [destinationPath]:string = './', options:{}): Promise\u003cstring | false\u003e\n```\n**`arguments`**\n\n- **files**: (string) of one file or more or array of folders and files paths\n- **archiveName**: (string) string of name and destination path of zip file (Where\n  do you want the get compressed zip file) by default is './archive.zip' (current working\n  directory (CWD))\n- **options**: object of compressing options\n-   **overwrite**: boolean\n- \n### Examples:\n\n```js\n// unZip From File\nconsole.log(await compress(\"./myfiles\")); //=\u003e boolean\nconsole.log(await compress(\"./mypicter.png\", \"new-dir/mypicter.zip\")); //=\u003e boolean\nconsole.log(await compress([\"./mypicters\", \"./textpalne.txt\"], \"compressed.zip\", {overwrite:true})); //=\u003e boolean\n\n```\n### Decompressing\n\n```js\ndecompress(filePath:string, destinationPath:string = './', options:{}): Promise\u003cstring | false\u003e\n```\n\n**`arguments`**\n\n- **filePath**: string of zip file path.\n- **destinationPath**: (null|string) null or string of destination path (Where\n  do you want the unzipped files to be) as default is './' (current working\n  directory (CWD))\n- **options**: object of unzipping options\n\n**`return`** Promise\u003cstring | false\u003e The destination path or false if the\nextraction process fails.\n\n### Examples:\n\n```js\n// unZip From File\nconsole.log(await decompress(\"myfile.zip\")); //=\u003e ./\nconsole.log(await decompress(\"myfile.zip\", \"new-dir\")); //=\u003e new-dir\nconsole.log(\n  await decompress(\"myfile.zip\", null, {\n    includeFileName: true,\n  }),\n); //=\u003e myfile\nconsole.log(\n  await decompress(\"myfile.zip\", \"new-dir\", {\n    includeFileName: true,\n  }),\n); //=\u003e new-dir\\myfile\n\n```\n\n## Contribute with us from [`Here`](https://github.com/moncefplastin07/deno-zip)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoncefplastin07%2Fdeno-zip","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmoncefplastin07%2Fdeno-zip","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoncefplastin07%2Fdeno-zip/lists"}