title: How do I get Java to use my multi-core processor with GZIPInputStream?
body: <p>I'm using a GZIPInputStream in my program, and I know that the performance would be helped if I could get Java running my program in parallel.</p>
  
  <p>In general, is there a command-line option for the standard VM to run on many cores? It's running on just one as it is.</p>
  
  <p>Thanks!</p>
  
  <p><b>Edit</b></p>
  
  <p>I'm running plain ol' Java SE 6 update 17 on Windows XP.</p>
  
  <p><strike>Would putting the GZIPInputStream on a separate thread explicitly help?</strike> No! Do not put the GZIPInputStream on a separate thread! Do NOT multithread I/O!</p>
  
  <p><b>Edit 2</b></p>
  
  <p>I suppose I/O is the bottleneck, as I'm reading and writing to the same disk...</p>
  
  <p>In general, though, is there a way to make GZIPInputStream faster? Or a replacement for GZIPInputStream that runs parallel?</p>
  
  <p><b>Edit 3</b>
  Code snippet I used:</p>
  
  <pre><code>GZIPInputStream gzip = new GZIPInputStream(new FileInputStream(INPUT_FILENAME));
  DataInputStream in = new DataInputStream(new BufferedInputStream(gzip));
  </code></pre>