Skip to content

Glossary

OLE2 Compound File (CFB)

The Microsoft container format — a FAT-like filesystem inside a single file — that holds an MSI database, legacy Office documents and more.

An OLE2 Compound File, also called Compound File Binary (CFB) or a structured storage file, is a container format that behaves like a tiny filesystem inside a single file. It begins with the magic bytes D0 CF 11 E0 A1 B1 1A E1 and is organised into:

  • Sectors of a fixed size (512 or 4096 bytes), chained by a FAT — the same idea as a disk allocation table.
  • Storages (directories) and streams (files), listed in a directory of 128-byte entries arranged as a red-black tree.
  • A mini stream and mini-FAT for streams smaller than 4096 bytes, so many small streams don't waste whole sectors.

An .msi is a compound file whose streams are the MSI database tables (their names MSI-name-encoded) plus special streams like \5SummaryInformation and \5DigitalSignature. The same container also holds legacy .doc/.xls/.ppt, .msg email and many other Microsoft formats, which is why a bare "OLE2" magic alone does not tell you it is an MSI — you have to look for the _Tables/_Columns streams.

A robust reader never trusts a length or sector id from the file: a malformed compound file should yield truncated data, never a crash or an infinite loop.