{"id":17223409,"url":"https://github.com/conduitry/do-not-zip","last_synced_at":"2025-04-14T00:22:55.876Z","repository":{"id":45985552,"uuid":"130240195","full_name":"Conduitry/do-not-zip","owner":"Conduitry","description":"Do not zip. Just store. // Mirror of https://git.chor.date/Conduitry/do-not-zip","archived":false,"fork":false,"pushed_at":"2021-11-22T22:50:54.000Z","size":20,"stargazers_count":24,"open_issues_count":3,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-27T14:21:58.886Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://conduitry.dev/do-not-zip","language":"JavaScript","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/Conduitry.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-04-19T15:59:15.000Z","updated_at":"2025-01-15T21:23:40.000Z","dependencies_parsed_at":"2022-08-29T02:10:37.563Z","dependency_job_id":null,"html_url":"https://github.com/Conduitry/do-not-zip","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Conduitry%2Fdo-not-zip","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Conduitry%2Fdo-not-zip/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Conduitry%2Fdo-not-zip/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Conduitry%2Fdo-not-zip/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Conduitry","download_url":"https://codeload.github.com/Conduitry/do-not-zip/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248492884,"owners_count":21113163,"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":[],"created_at":"2024-10-15T04:08:15.811Z","updated_at":"2025-04-14T00:22:55.581Z","avatar_url":"https://github.com/Conduitry.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# do-not-zip\n\n[![npm version](https://img.shields.io/npm/v/do-not-zip.svg?style=flat-square)](https://www.npmjs.com/package/do-not-zip)\n\nDo not zip. Just store.\n\n## What\n\nStick some text files into a zip file. This library is super simple and small because it just stores the files without compressing them, which is often sufficient when all you want to do is let the user download some files generated in the browser. Works on the server (Node.js) and on the client (JavaScript). Requires ES2015+.\n\n## How\n\n```javascript\nimport * as doNotZip from 'do-not-zip';\n\n// on the server or the client:\nconst byteArray = doNotZip.toArray([\n\t// each file should have:\n\t// - 'path' - a string\n\t// - 'data' - a string, or an array of bytes or Uint8Array or Buffer or anything else that gives integers when indexed\n\t{ path: 'path/to/file1.txt', data: 'Hello' },\n\t{ path: 'another/file2.txt', data: 'World' },\n\t{ path: 'yet/another/file3.bin', data: [1, 2, 3, 4, 5] },\n\t// ...\n]);\n// =\u003e output will be an array of bytes\n\n// on the server:\nconst buffer = doNotZip.toBuffer([ ... ]);\n// =\u003e output will be a Buffer\n\n// on the client:\nconst blob = doNotZip.toBlob([ ... ]);\n// =\u003e output will be a Blob\n\n// on the server or the client:\nconst bufferOrBlob = doNotZip.toAuto([ ... ]);\n// =\u003e output will be a Buffer on the server and a Blob on the client\n// (which one to return is determined by whether there is a Blob global defined)\n```\n\n## Thanks\n\n- https://github.com/mrananyan/ZipperJS\n- https://users.cs.jmu.edu/buchhofp/forensics/formats/pkzip.html\n- https://stackoverflow.com/a/18639999\n\n## License\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconduitry%2Fdo-not-zip","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fconduitry%2Fdo-not-zip","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconduitry%2Fdo-not-zip/lists"}