   File Archives
  I''ve been toying with the idea of file archives for a few days now. My question concerns the deletion of files from within the archive. So far if I wish to remove a file somewhere in the middle of the archive, I just remove it by looking it up in the allocation table and overwriting the file with zeros. Obviously that causes lost space in the archive. Would it be effective/efficient to "shift" the rest of the files in the archive and update each entry in the alloc table? One method I''ve thought of is to read the allocation table and create a tree, then every time the archive is saved the program could completely rewrite all files in the archive.Let me add that this would be used in an editor. I realize that a game would have no need to do anything but read from the archive. Any suggestions are appreciated.  
  My suggestion is that no rewriting is needed everytime a file is deleted from the archive, if files are often deleted.Just rearrange the archive when lots of space are lost after many times of deletion, this would be a compromise between the space and the efficiency.And only the modification to the allocation table is necessary when a file is deleted, you don''t need to overwrite the file with zeros. It doesn''t matter what fills the file space now.;  Yeah... just remove it from the allocation table, and perhaps overwrite the empty sections if a new file to be added to the archive is smaller than the ''empty'' space and just do it that way. Then provide a ''compact archive'' function that will read all the files and rewrite them without the wasted space, that you can use either when the files reach a certain amount of wasted space, or manually.  