title: Calculate (approximately) if zip64 extensions are required without relying on exceptions?
body: <p>I have the following requirements (from the client) for zipping a number of files. </p>
  
  <p>If the zip file created is less than 2**31-1 ~2GB use compression to create it (use zipfile.ZIP_DEFLATED), otherwise do not compress it (use zipfile.ZIP_STORED).</p>
  
  <p>The current solution is to compress the file without zip64 and catching the zipfile.LargeZipFile exception to then create the non-compressed version.</p>
  
  <p>My question is whether or not it would be worthwhile to attempt to calculate (approximately) whether or not the zip file will exceed the zip64 size without actually processing all the files, and how best to go about it? The process for zipping such large amounts of data is slow, and minimizing the duplicate compression processing might speed it up a bit.</p>
  
  <p>Edit: I would upvote both solutions, as I think I can generate a useful heuristic from a combination of max and min file sizes and compression ratios. Unfortunately at this time, StackOverflow prevents me from upvoting anything (until I have a reputation higher than noob). Thanks for the good suggestions.</p>