0

I has been trying to reverse-engineer the Microsoft Office file formats and I've found they are actually Open XML and the "Open XML" file format is actually a ZIP format.

When I open the Office files with a binary (hex) editor, it has the same file signature of a ZIP file (the signature is PK.. (67324752)).

PK signature

By the way, the Office files can be opened with WinRAR like any ZIP file.

My question is: Why Microsoft decided to use ZIP containers and XML instead of a proprietary file format with custom signature and headers? Doesn't it make easier to reverse-engineer or slower to read and write?

  • 2
    This is an opinion based question and is off topic. Only MS can answer why MS did something. As for MS using zip files for office... They have been doing that for a very long time. Other companies do it as well. Java JAR files are just zip files. – Keltari Jun 4 '19 at 17:16
1

As far as the 'factual' parts of the question go...

Why Microsoft decided to use ZIP containers and XML instead of a proprietary file format with custom signature and headers?

They used to do exactly that for the original custom and later CDF-based formats (.doc, .xls, etc.) all the way until Office 2003, and later toyed with raw single-file XML as a document format, until they finally switched to ZIP+XML for the new format (.docx, .xlsx, etc.) in Office 2007.

As for "Why", only Microsoft itself knows exactly why that choice was made, but ZIP containers were already very common at that time (e.g. for the competing OpenDocument specification, for Java .jar archives, and so on) so you can make your own guess.

You can find more details on Wikipedia: Standardization of Office Open XML

Doesn't it make easier to reverse-engineer

The format is literally called "Office Open XML" and has a full set of specifications published as an ECMA standard (ECMA-376) upon EU's request to support some form of open document format.

So preventing reverse-engineering is not its goal; quite the opposite. It's why the old binary CDF formats were abandoned in the first place.

Not the answer you're looking for? Browse other questions tagged or ask your own question.