- Source:
src/lib/otezip.c,src/main.c, headers insrc/include/otezip/zip.h, config insrc/include/otezip/config.h. - Algorithms: minimalistic, but fully functional implementations for every compression algorithm
src/lib/*.inc.c(deflate, lzma, brotli, zstd, lzfse). - Tests: integration script
test/test.shand unit tests intest/unit/. Sample assets intest/(e.g.,test.zip, sample files).
- Build default binary:
make - Build with more algorithms:
make all-compression(or toggle defines inconfig.h) - Install/uninstall:
make install/make uninstall - Run tests:
make -C test(builds unit tests, runs integration script) - Quick usage examples:
- Create:
./otezip -c out.zip file1 file2 -z1(deflate) - List:
./otezip -l out.zip - Extract:
./otezip -x out.zip
- Create:
- Language: C (C99). Aim for warning-free builds with
-Wall/-Wextra. - Indentation: tabs preferred (match existing files). Keep lines concise.
- File naming: core in
otezip.*; algorithms asname-*.inc.c; tests astest_*.candtest_*.sh. - Preprocessor: guard features with
OTEZIP_ENABLE_*and reuseOTEZIP_METHOD_*IDs fromconfig.h.
- Unit tests: add focused tests in
test/unit/and register intest/unit/Makefile. - Integration: extend
test/test.shfor end-to-end flows (create, list, extract). For nonstandard ZIP methods (e.g., Brotli=97), prefer verifying withotezipextraction;unzipmay not support them. - Run locally with
make -C test; ensure added tests are deterministic and cleanup temp dirs.
- Commits: short, imperative summaries (e.g., "Fix deflate edge case"). Group related changes and keep scope tight.
- PRs: include a clear description, rationale, and a brief list of changes. Link issues where applicable.
- Verification: show how you built and tested (commands/output), and note any algorithm flags changed.
- Enable/disable algorithms via
config.horCOMPRESSION_FLAGSin the Makefile. Ensure fallbacks work (code auto-falls back to STORE when compression is ineffective).