title: Writing a random access file transparently to a zip file
body: <p>I have a java application that writes a RandomAccessFile to the file system. It has to be a RAF because some things are not known until the end, where I then seek back and write some information at the start of the file.</p>
  
  <p>I would like to somehow put the file into a zip archive. I guess I could just do this at the end, but this would involve copying all the data that has been written so far. Since these files can potentially grow very large, I would prefer a way that somehow did not involve copying the data.</p>
  
  <p>Is there some way to get something like a "ZipRandomAccessFile", a la the ZipOutputStream which is available in the jdk?</p>
  
  <p>It doesn't have to be jdk only, I don't mind taking in third party libraries to get the job done.</p>
  
  <p>Any ideas or suggestions..?</p>