{"id":25289144,"url":"https://github.com/falk-werner/zipstream","last_synced_at":"2025-04-06T17:46:59.199Z","repository":{"id":276663072,"uuid":"929899846","full_name":"falk-werner/zipstream","owner":"falk-werner","description":"Create ZIP files on the fly","archived":false,"fork":false,"pushed_at":"2025-02-24T16:30:55.000Z","size":37,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-24T17:42:14.920Z","etag":null,"topics":["stream","zip"],"latest_commit_sha":null,"homepage":"","language":"C++","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/falk-werner.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":"2025-02-09T16:57:46.000Z","updated_at":"2025-02-24T16:30:56.000Z","dependencies_parsed_at":"2025-02-09T18:37:29.966Z","dependency_job_id":null,"html_url":"https://github.com/falk-werner/zipstream","commit_stats":null,"previous_names":["falk-werner/zipstream"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/falk-werner%2Fzipstream","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/falk-werner%2Fzipstream/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/falk-werner%2Fzipstream/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/falk-werner%2Fzipstream/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/falk-werner","download_url":"https://codeload.github.com/falk-werner/zipstream/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247526678,"owners_count":20953141,"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":["stream","zip"],"created_at":"2025-02-12T23:50:26.282Z","updated_at":"2025-04-06T17:46:59.168Z","avatar_url":"https://github.com/falk-werner.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build](https://github.com/falk-werner/zipstream/actions/workflows/build.yml/badge.svg)](https://github.com/falk-werner/zipstream/actions/workflows/build.yml)\n\n# zipstream\n\nC++ library to create ZIP archives on the fly.\n\nZIP files can be created in a single pass without storing them on disk. This project contains a C++ library that to provide a stream oriented pull API to create zip archives.\n\n## Usage\n\n```C++\n#include \u003czipstream\u003e\n\nint main(int argc, char * argv[])\n{\n\n    zipstream::builder builder;\n\n    builder.add_file_with_content(\"foo.txt\", \"foo\");\n    builder.add_file_from_path(\"bar.txt\" \"path/to/bar.txt\");\n \n    auto stream = builder.build();\n\n    constexpr size_t const buffer_size = 10 * 1024;\n    char buffer[buffer_size];\n    size_t count = stream.read(buffer, buffer_size);\n    while (count \u003e 0)\n    {\n        // consume chunk of zip archive\n        count = stream.read(buffer, buffer_size);\n    }\n}\n```\n\n## Builder API\n\n| Method | Arguments | Description |\n| ------ | --------- | ----------- |\n| add_directory | name: str | Adds a directory to the archive |\n| add_file_with_content | name: str, contents: str | Add a static file with the given name and contents |\n| add_file_from_path | name: str, path: str | Adds the file specifed by path with the given name |\n\n### Notice\n\nAny file referenced by the builder must not be changed on the filesystem\nuntil the archive is completely read. Changes of files are not really\ntracked by the library an result either in exceptions (if the file is\ndeleted or truncated) or in corrupt archives (if the file is modified).\n\n## Missing Features\n\n- install library using `cmake install`\n- use correct file and directory attributes\n- use corrent file date and time\n- compress files using deflate\n- create zip64 archives\n- add more unit tests\n- add options to opt out creating unit tests\n\n\n## References\n\n- [ZIP file format specification](https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT)\n- [Description of external file attributes (Unix)](https://unix.stackexchange.com/questions/14705/the-zip-formats-external-file-attribute)\n- [CRC32](https://crccalc.com/?crc=42\u0026method=CRC-32/ISO-HDLC)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffalk-werner%2Fzipstream","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffalk-werner%2Fzipstream","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffalk-werner%2Fzipstream/lists"}