Archive (ZIP/TAR) format (.zip, .tar, .tgz, .tar.gz)
An archive (ZIP, TAR, or gzip-compressed TAR such as .tar.gz / .tgz) is
a namespace of inner documents rather than a single document. This reader is the
inspection face of that model: it walks the container's entries and, for
each one neokapi recognises (JSON, Markdown, HTML, XML, .po, YAML, …), parses
it through that format's own reader and surfaces its content as a child layer,
so kapi inspect and analysis tools can see inside the archive. Binary assets,
nested containers, and unrecognised entries are listed as opaque data members.
There is no archive writer. Translating the content inside a container
is the container binding, not a format round-trip: when a ZIP/TAR is given
to an output-producing command (kapi translate, kapi pseudo-translate, a
flow), each eligible entry is run as its own file through the normal
reader and writer with full skeleton round-trip, and the results are
repacked over the original container, copying every other member
byte-for-byte. Because each entry is a real, standalone file run, a
skeleton-bound packaged format such as a DOCX, PPTX, or EPUB inside the
archive round-trips faithfully, and each entry resolves its own format
configuration. Binary assets, nested containers, and bilingual interchange
files (XLIFF/PO/TMX) are copied through unchanged.
Because the shared ZIP signature is also used by OOXML, ODF, IDML, and EPUB,
detection resolves those specific formats first (by content) and falls back to
the generic archive reader for a plain ZIP/TAR. Inspection scope can be
narrowed with include / exclude glob patterns matched against the entry
path.
This format has no configurable parameters.
Processing notes
Each recognised entry is detected and parsed through its own format reader, surfaced as a child layer of the archive document.
Output is handled by the container binding rather than an archive writer, through per-entry file runs with skeleton round-trip followed by an atomic repack.
include/excludeglobs (matched against the slash-separated entry path) scope which entries are inspected;**matches across path separators.
Limitations
Read-only, so this format has no writer; a container is written through the container binding, not by reading and re-writing an "archive document".
During inspection, binary assets, nested containers, and unrecognised entries are surfaced as opaque data members rather than parsed.
Archive-wide size and entry-count limits (zip-bomb guards) apply to the whole container and to each entry.
← Back to the Format Reference