Now that we've thoroughly pounded into the deep earth all the interfaces and API functions related to compound files, we can look at how to actually apply it all to implementing file functions in an application. For this chapter, I have modified the Chapter 1 version of Cosmo to write its data into a compound file, demonstrating the simplest use of compound files: open, read or write, and then close. This version of Cosmo also retains compatibility with old versions of its files by using the conversion feature of compound files, which allows it to treat old files as storages. I have also added compound file support to Patron. Patron has a much more complicated storage scheme because we implement parts of the storage model shown earlier in Figure 7-6 on page 353.