I am working on a project for Windows Mobile that involves storing thousands of bitmap tiles on a device's flash card. For obvious reasons I don't want to store every bitmap tile as an individual tile. Instead, I want to store all the tiles in one (or a few) large files. The tiles have to be stored in such a way to be easily accessible by their x,y and z properties. Does anyone know of any open-source storage engines that would handle this for me?

I have created my own "database" format for this but I get the feeling there are probably much faster ways to handle it. The other complication is I want to be able to add tiles to this database on-the-fly from the device. The database format I dreamnt up a long time ago doesn't handle this well.

Can anyone direct me to an open-source storage engine that does this or give me some pointers on "best practices"? I really don't want to mess with installing a RDBMS on a portable device.