{"id":45583960,"url":"https://github.com/cloudacy/zippen","last_synced_at":"2026-02-23T11:48:47.697Z","repository":{"id":143912331,"uuid":"262327126","full_name":"cloudacy/zippen","owner":"cloudacy","description":"A lightweight and easy to use js zip generator","archived":false,"fork":false,"pushed_at":"2024-05-01T08:24:05.000Z","size":259,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-05-02T20:27:06.050Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cloudacy.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2020-05-08T13:12:30.000Z","updated_at":"2024-05-01T08:24:08.000Z","dependencies_parsed_at":null,"dependency_job_id":"868ae56d-57ff-42dd-84a3-08789306320a","html_url":"https://github.com/cloudacy/zippen","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/cloudacy/zippen","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudacy%2Fzippen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudacy%2Fzippen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudacy%2Fzippen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudacy%2Fzippen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cloudacy","download_url":"https://codeload.github.com/cloudacy/zippen/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudacy%2Fzippen/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29741801,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-23T07:44:07.782Z","status":"ssl_error","status_checked_at":"2026-02-23T07:44:07.432Z","response_time":90,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":"2026-02-23T11:48:47.425Z","updated_at":"2026-02-23T11:48:47.684Z","avatar_url":"https://github.com/cloudacy.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# zippen\n\n`zippen` is a small and easy to use zip generator. It can be used to pack multiple files / buffers into one .zip file / buffer.\n\nThis package was built based on the [**pkware .ZIP File Format Specification**](https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT).\n\n## usage\n\n### import\n\n#### commonjs\n\n```javascript\nconst Zip = require('@cloudacy/zippen').Zip\n```\n\n#### es6 module\n\n```javascript\nimport {Zip} from '@cloudacy/zippen'\n```\n\n### create zip object\n\n```javascript\nconst zip = new Zip()\n```\n\n### add entries to the zip\n\n##### arguments\n\n- path - `string`: The location of the file to be stored in the .zip file (may also contain directories: e.g. `foo/bar.txt`)\n- last modified date - `Date`: A date object, holding the last modified date of the file or directory\n- data - `Buffer | undefined`: If the entry is a file, this should be a buffer, holding the uncompressed data. If it is a directory, pass `undefined` here.\n\n```javascript\nzip.addEntry('foo.txt', new Date(), Buffer.from('bar'))\n```\n\n### return the resulting .zip file buffer\n\nThis will return the resulting .zip buffer.\n\n```javascript\nzip.build()\n```\n\n### store resulting .zip file\n\n`write` will store the resulting .zip file at the given file path.\n\n##### arguments\n\n- path - `string | number | Buffer | URL`: The location of the resulting .zip file.\n\n```javascript\nzip.write('foo.zip')\n```\n\n## example\n\n```javascript\nconst zip = new Zip()\nzip.addEntry('foo.txt', new Date(), Buffer.from('bar'))\nzip.write('foo.zip')\n```\n\n## general zip structure\n\n- `local file header 1`\n- `encryption header 1`\n- `file data 1`\n- `data descriptor 1`\n- ...\n- `local file header n`\n- `encryption header n`\n- `file data n`\n- `data descriptor n`\n- `archive decryption header`\n- `archive extra data record`\n- `central directory header 1`\n- ...\n- `central directory header n`\n- `zip64 end of central directory record`\n- `zip64 end of central directory locator`\n- `end of central directory record`\n\n### example of a .zip file\n\nThe following example is a hexdump of a .zip file, holding one file, called `abc.txt` with the content `abc\\n`. The file was generated by a macOS 10.14.2 system.\n\nAll parts of the .zip file were grouped to the pieces of a .zip file. The bytes were also grouped by their meaning, based on the specification.\n\n#### local file header block\n\n- local file header signature: `50 4b 03 04`\n- version needed to extract: `14 00`\n- general purpose bit flag: `08 00`\n- compression algorithm: `08 00`\n- last mod file time (MSDOS format): `6b 81`\n- last mod file date (MSDOS format): `8f 4d`\n- crc-32: `00 00 00 00`\n- compressed size: `00 00 00 00`\n- uncompressed size: `00 00 00 00`\n- file name length: `07 00`\n- extra field length: `10 00`\n- file name: `61 62 63 2e 74 78 74` - ASCII: `abc.txt`\n\n#### compressed data block(s)\n\n- compressed data: `4b 4c 4a e6 02 00`\n\n#### data descriptor block(s)\n\n- data descriptor signature (unofficial): `50 4b 07 08`\n- crc-32: `4e 81 88 47`\n- compressed size: `06 00 00 00`\n- uncompressed size: `04 00 00 00`\n\n#### central directory block(s)\n\n- central file header signature: `50 4b 01 02`\n- version made by: `15 03`\n- version needed to extract: `14 00`\n- general purpose bit flag: `08 00`\n- compression method: `08 00`\n- last mod file time (MSDOS format): `6b 81`\n- last mod file date (MSDOS format): `8f 4d`\n- crc-32: `4e 81 88 47`\n- compressed size: `06 00 00 00`\n- uncompressed size: `04 00 00 00`\n- file name length: `07 00`\n- extra field length: `00 00`\n- file comment length: `00 00`\n- disk number start: `00 00`\n- internal file attributes: `00 00`\n- external file attributes: `00 40 a4 81`\n- relative offset of local header: `00 00 00 00`\n- file name: `61 62 63 2e 74 78 74` - ASCII: `abc.txt`\n\n#### end of central directories block\n\n- end of central directories signature: `50 4b 05 06`\n- disk number: `00 00`\n- disk number: `00 00`\n- number of entries: `01 00`\n- number of entries on this disk: `01 00`\n- size of central directory block(s): `41 00 00 00`\n- offset of central directory block(s): `4b 00 00 00`\n- comment length: `00 00`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudacy%2Fzippen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcloudacy%2Fzippen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudacy%2Fzippen/lists"}