I only used WriteComponentRes to save the package-file index because I was too lazy to use records (which would've been the more elegant way of doing it). In that index I store information about the number of files and the size of each file as well as the file names, etc.
From the file size I can then calculate the position of each file in the package by simply summing up the sizes (Storing an offset in the index table is more effective though).