OLE Compound Files

Compound file is a file-based implementation of OLE Structured Storage that is a tree-like structure made of two types of objects: streams and storages. Structured Storage is very similar to the file system - there are streams, which contain data (like files), and storages, which don't have any associated data, but can contain streams and other storages (like directories). You can consider a compound file as a file system in a file.

The most common example of compound files is a Microsoft Office files. The structure of a typical Microsoft Word file may look like this:

MS Word File Streams

The file on the screenshot consists of the root storage, one empty substorage, and five data streams.

Of course, editing MS Office files with a hex editor is not a very common task, however if you are a developer using Structured Storage in your program, you will find this feature indispensable.

Note that a compound file is a higher level entity that resides in the unnamed stream of an ordinary file. You can open the compound file as any other file and edit it as a stream of raw data.