<p>Previously, I asked the <a href="https://stackoverflow.com/questions/79136/how-do-i-create-a-container-file">question</a>.</p>

<p>The problem is the demands of our file structure are very high.</p>

<p>For instance, we're trying to create a container with up to 4500 files and 500mb data.</p>

<p>The file structure of this container consists of </p>

<ul>
<li>SQLite DB (under 1mb)</li>
<li>Text based xml-like file 
<li><p>Images inside a dynamic folder structure that make up the rest of the 4,500ish files</p></li>
<li><p>After the initial creation the images files are read only with the exception of deletion.</p></li>
<li>The small db is used regularly when the container is accessed.</li>
</ul>

<p>Tar, Zip and the likes are all too slow (even with 0 compression). Slow is subjective I know, but to untar a container of this size is over 20 seconds.</p>

<p>Any thoughts?</p>

Working on the assumption that you're only going to need read-only access to the files why not just merge them all together and have a second "index" file (or an index in the header) that tells you the file name, start position and length. All you need to do is seek to the start point and read the correct number of bytes. The method will vary depending on your language but it's pretty straight forward in most of them.
The hardest part then becomes creating your data file + index, and even that is pretty basic!