MSI API doesn't per say have a compact database function. There's a help topic:
Reducing the Size of an .msi File that suggests:
To remove wasted storage space and reduce the final size of .msi
files, you have the following options. •Export all of the tables in
the database to .idt files, and then import those into a new database.
This produces the most compact storage possible. •Use a software
utility for compacting the storage space of OLE document files.
Assuming this is your MSI, just use your tool to build it uncompressed. If it's another MSI you'll have to follow the recommendations. You'll also need to update the Media table to tell it that you aren't using an embedded cab anymore.