{"id":13542734,"url":"https://github.com/michaelrsweet/zipc","last_synced_at":"2025-10-26T07:39:19.253Z","repository":{"id":143286342,"uuid":"87199420","full_name":"michaelrsweet/zipc","owner":"michaelrsweet","description":"Simple ZIP container writing \"library\"","archived":false,"fork":false,"pushed_at":"2025-05-20T20:32:54.000Z","size":218,"stargazers_count":13,"open_issues_count":0,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-08-25T07:27:05.190Z","etag":null,"topics":["c","containers","zip","zlib"],"latest_commit_sha":null,"homepage":"https://www.msweet.org/zipc","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/michaelrsweet.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},"funding":{"github":"michaelrsweet","liberapay":"michaelrsweet"}},"created_at":"2017-04-04T14:54:15.000Z","updated_at":"2025-06-30T04:30:06.000Z","dependencies_parsed_at":"2023-05-10T17:00:50.399Z","dependency_job_id":null,"html_url":"https://github.com/michaelrsweet/zipc","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/michaelrsweet/zipc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michaelrsweet%2Fzipc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michaelrsweet%2Fzipc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michaelrsweet%2Fzipc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michaelrsweet%2Fzipc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/michaelrsweet","download_url":"https://codeload.github.com/michaelrsweet/zipc/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michaelrsweet%2Fzipc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281074241,"owners_count":26439421,"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","status":"online","status_checked_at":"2025-10-26T02:00:06.575Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["c","containers","zip","zlib"],"created_at":"2024-08-01T11:00:16.503Z","updated_at":"2025-10-26T07:39:19.218Z","avatar_url":"https://github.com/michaelrsweet.png","language":"C","funding_links":["https://github.com/sponsors/michaelrsweet","https://liberapay.com/michaelrsweet"],"categories":["C"],"sub_categories":[],"readme":"zipc - ZIP Container \"Library\"\n==============================\n\n![Version](https://img.shields.io/github/v/release/michaelrsweet/zipc?include_prereleases)\n![BSD 2-Clause](https://img.shields.io/github/license/michaelrsweet/zipc)\n[![Coverity Scan Status](https://img.shields.io/coverity/scan/22416.svg)](https://scan.coverity.com/projects/michaelrsweet-zipc)\n[![LGTM Grade](https://img.shields.io/lgtm/grade/cpp/github/michaelrsweet/zipc)](https://lgtm.com/projects/g/michaelrsweet/zipc/context:cpp)\n[![LGTM Alerts](https://img.shields.io/lgtm/alerts/github/michaelrsweet/zipc)](https://lgtm.com/projects/g/michaelrsweet/zipc/)\n\nThis is a simple ZIP container \"library\" consisting of a C source file and\naccompanying header file.  The ZIP format is documented in the PKWARE\n[APPNOTE.TXT - .ZIP File Format Specification](http://www.pkware.com/appnote).\n\nCurrently I have only implemented reading and writing of files smaller than 4GB\nwith or without deflate compression.  There is no support for signatures,\nencryption, password protection, etc. as those features of ZIP are typically not\nused for ZIP container-based formats.\n\nI'm providing this as open source under the \"new\" 2-clause BSD license which\nallows you do pretty much do whatever you like with it.  Please do provide\nfeedback and report bugs to the Github project page at:\n\n    https://github.com/michaelrsweet/zipc\n\nso that everyone can benefit.\n\n\nRequirements\n------------\n\nYou'll need ZLIB and a C compiler.\n\n\nHow to Incorporate With Your Project\n------------------------------------\n\nAdd the `zipc.c` and `zipc.h` files to your project.  Include the `zipc.h`\nheader in any file that needs to write ZIP containers.\n\nIf you only use the ZIP reading functionality, define the `ZIPC_ONLY_READ`\npreprocessor macro.  If you only use the ZIP writing functionality, define the\n`ZIPC_ONLY_WRITE` preprocessor macro.  Both will reduce the size of the code\nthat is included with your project.\n\n\n\"Kicking the Tires\"\n-------------------\n\nThe supplied makefile allows you to build the unit tests on Linux and macOS (at\nleast), which verify that all of the functions work as expected to produce a\nZIP container called `testzipc.dat`.  Currently the only way to validate the\noutput is with a ZIP extractor like `unzip`, e.g.:\n\n    make\n    unzip -lv testzipc.dat\n\nThe unzip command should produce output that looks similar to this:\n\n    Archive:  testzipc.dat\n     Length   Method    Size  Cmpr    Date    Time   CRC-32   Name\n    --------  ------  ------- ---- ---------- ----- --------  ----\n          20  Stored       20   0% 04-05-2017 08:22 e2caffa4  testzipc.txt\n           0  Stored        0   0% 04-05-2017 08:22 00000000  META-INF/\n         139  Stored      139   0% 04-05-2017 08:22 ae7d2a18  META-INF/testzipc.xml\n           0  Stored        0   0% 04-05-2017 08:22 00000000  CONTENTS/\n        1024  Defl:X      512  50% 04-05-2017 08:22 0f066577  CONTENTS/data.bin\n        2649  Defl:X     1139  57% 04-05-2017 08:22 0f066577  CONTENTS/zipc.h\n        5422  Defl:X     1955  64% 04-05-2017 08:22 8c8d34e8  CONTENTS/testzipc.c\n       23480  Defl:X     5720  76% 04-05-2017 08:22 9eb6a0e7  CONTENTS/zipc.c\n        9244  Defl:X     3689  60% 04-05-2017 08:22 e59302d9  CONTENTS/testzipc.o\n       23608  Defl:X    10126  57% 04-05-2017 08:22 de8bcbd8  CONTENTS/zipc.o\n    --------          -------  ---                            -------\n       64562            22788  65%                            9 files\n\n\nChanges in v1.4\n---------------\n\n- Fixed some new Coverity-reported error handling issues with the ZLIB functions\n\n\nChanges in v1.3\n---------------\n\n- Fixed some issues when building using Visual Studio.\n- Switched to using `localtime_r/s` to avoid potential thread safety issues.\n- Fixed some issues reported by Coverity.\n\n\nChanges in v1.2\n---------------\n\n- Added C++ header wrapper.\n- Added ZIP read support using the `zipcOpenFile`, `zipcFileGets`,\n  `zipcFileRead`, `zipcFileXMLGets`, and `zipcXMLGetAttribute` functions.\n- The `zipcFileXMLPrintf` function now supports `%f`.\n- Fixed builds using Visual C++.\n\n\nChanges in v1.1\n---------------\n\nThe following changes were made for v1.1:\n\n- Added the `zipcCopyFile` function.\n- Now update the CRC and lengths in the file headers for compatibility with all\n  EPUB and OPC applications.\n\n\nLegal Stuff\n-----------\n\nCopyright © 2017-2025 by Michael R Sweet.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n\n1. Redistributions of source code must retain the above copyright notice,\n   this list of conditions and the following disclaimer.\n2. Redistributions in binary form must reproduce the above copyright notice,\n   this list of conditions and the following disclaimer in the documentation\n   and/or other materials provided with the distribution.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichaelrsweet%2Fzipc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmichaelrsweet%2Fzipc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichaelrsweet%2Fzipc/lists"}