I've got the same aim as noeska, I'm not interested in pack files, I want to do more than that.

Anyway, I'm not sure there's any other way to store files than just diving them into blocks. Of course you can write them at once, but then removing these from package would mean copying a file to the end of the package file and then truncating its size by the size of the removed file. And this is well-known to be a slow operation, especially when talking about "bigger" files (>1 GB).

And AFAIK, fragmentation cannot be avoided. I just can't think of any other way of storing files inside a package.