Zip Format
Documentszip-formatZip Format is an Agent Skill for documents published in the adamhathcock/sharpcompress repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
Reference the ZIP/ZIP64/PKWARE APPNOTE archive container format. Use when an AI agent needs to answer questions or make code changes involving ZIP local headers, central directory records, EOCD/Zip64 records, data descriptors, general purpose bit flags, compression method IDs, extra fields, encryption markers, split archives, or SharpCompress Zip parsing and writing behavior.
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Inspect the Agent Skill at https://github.com/adamhathcock/sharpcompress/blob/HEAD/.agents/skills/zip-format/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/zip-format, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
Zip Format
Use this skill for ZIP container-format work. It provides a local, SharpCompress-oriented reference for PKWARE APPNOTE ZIP records, ZIP64, compression method IDs, extra fields, and the current SharpCompress Zip implementation.
Reference
- Read references/zip-format.md when the task depends on ZIP binary layout, record signatures, local vs central directory metadata, data descriptor rules, Zip64 sentinel values, extra field parsing, compression method IDs, encryption markers, split archive handling, or current SharpCompress Zip support boundaries.
- Treat the reference as an implementation guide, not a standards replacement. It summarizes PKWARE APPNOTE 6.3.10 from
https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXTand documents SharpCompress-specific behavior and limitations. - Prefer the SharpCompress support matrix in the reference over generic ZIP assumptions when changing code. ZIP is highly extensible, and SharpCompress intentionally supports only selected records, methods, and extra fields.
Workflow
- Identify which layer is involved: header discovery, local file headers, central directory headers, EOCD/Zip64 records, data descriptors, extra fields, compression methods, encryption, reader/archive/writer API behavior, or tests.
- Open the relevant section in
references/zip-format.mdand use the source-file pointers before changing code. - For parsing changes, cross-check sync and async header readers:
ZipHeaderFactory.cs,ZipHeaderFactory.Async.cs,SeekableZipHeaderFactory.cs,StreamingZipHeaderFactory.cs,ZipFileEntry.cs,LocalEntryHeader.cs, andDirectoryEntryHeader.cs. - For writer changes, verify local header, post-data descriptor, central directory, Zip64, and sync/async paths together.
- For support claims, keep unsupported features explicit: central directory encryption, strong encryption records, XZ writing, non-standard compression methods, broad extra-field semantics, and non-seekable Zip64 writing.