DOCX, APK, JAR, EPUB: the ZIP files you use every day
Haven Zip team · · 2 min read
Rename a Word document from report.docx to report.zip and double-click it. A folder opens with XML files, a media directory and a manifest. You have not broken anything; you have just seen the container that Office has used since 2007. The same is true of Android apps, Java programs, e-books, Firefox extensions and a surprising number of other things.
Why so many formats chose ZIP
A modern document is not one thing. It is text, styles, images, fonts, embedded spreadsheets and metadata. Designers of these formats needed a way to bundle many parts into a single file that any programming language could read and write, with random access to individual parts and optional compression. ZIP already did all of that and had free implementations everywhere. Inventing a new container would have meant years of work for no benefit.
So they standardized on ZIP plus a convention: a fixed set of file names inside, and a small file that says what the package is. In Office Open XML that is [Content_Types].xml; in EPUB it is a mimetype file that must be the first entry and stored uncompressed; in APK and JAR it is the META-INF directory with a manifest and signatures.
A field guide
The list is longer than most people expect. These are all ZIP archives:
- Office Open XML: .docx, .xlsx, .pptx (Microsoft Office 2007 and later)
- OpenDocument: .odt, .ods, .odp (LibreOffice)
- Java: .jar, .war, .ear
- Android: .apk, .aab; Chrome/Firefox extensions: .crx (with a header), .xpi
- E-books: .epub; Apple: .pages, .numbers, .key, .ipa
- 3D and CAD: .3mf, .f3d; design: .sketch, .fig (partly)
- Data: .xpi, .whl (Python wheels), .nupkg (NuGet), .vsix (VS Code extensions)
What you can and cannot safely do
Looking inside is always safe. Haven Zip opens any of these directly, without renaming, and lets you preview the XML or extract the embedded images from a presentation, which is the fastest way to recover a photo someone pasted into a slide deck.
Editing and re-zipping needs care. Office expects specific compression and file order in some cases; EPUB requires the mimetype entry to be first and uncompressed; APK and JAR carry signatures over their contents, so any change invalidates the signature and the app will not install. Treat these packages as read-only unless you know the format's rules.