thats how i do

ps: it will be nice to sort the order of the files by their folders, but it's not necessary

generate the xml
-> start the offset at 0 and sum it with the size of previous file entry

file structure:
-> array of char[0..3] with your header
-> uint32 with the size of the xml
-> the xml with offsets
-> store the files

-----------------------------

when opening, read the header
if header is not good abort

read the size of the structure xml, then read and parse the xml

for acessing a file, sum ( 8 + xmlsize ) to the offset described on the xml,

or seek from the end of xml file with the offset described on the xml


there are other possible structures, like storing the xml on the end of the file etc..