POLE is a portable C++ library to access structured storage. It is designed to be compatible with Microsoft structured storage, also sometimes known as OLE Compound Document.
A structured storage is normally used to store files inside another file; you can even have complex directory tree inside. It can be treated as a filesystem inside a file.
The most popular use of structured storage is in Microsoft Office. Structured storage does not offer compression nor encryption support, hence usually it is used only for interoperability purposes.
Compared to structured storage routines offered by Microsoft Windows API, POLE has the advantage that it is portable. You can access any structured storage in the supported platform, you don't need to rely on Windows library.
To compile POLE, you need a C++ compiler, with standard C++ library which supports STL (Standard Template Library).
POLE is just a library, you have to integrate it as part of your application/project. Since it consists of one source file and one header file, it does not make much sense to compile POLE as separate library (either static or dynamic). Simply add these files to your project and you are done.
The source tarball of POLE demonstrates the use of POLE to build poledump, a small utility to extract any stream inside a structured storage. If you use g++ as the compiler, you can compile poledump using the following command:
g++ -o poledump pole.cpp poledump.cpp
You may use poledump like the example below:
poledump budget.xls Workbook result.xls
The above command will extract a stream named Workbook inside Excel document (budget.xls) and save it as result.xls. File result.xls will still be recognized as a valid workbook (in raw format). Launch Microsoft Excel, open this file, and convince yourself.
Since version 0.2, the source tarball also includes a graphical tool named POLEView. Its purpose is to show the content of a structured storage in a tree view. It is also possible to view each stream in hexadecimal format and/or export the stream as well. You can study its source code to get familiar on how to use POLE API.
To compile POLEView, you need Qt (from Trolltech) version 3.x. Most Linux distributions normally already package the latest version of Qt, so it is likely that you need to worry about this. The Windows version is still planned, awaiting for the release of Qt version 4.
The build command for poleview is:
qmake && make