Need to improve the performance of code for unzipping files
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/4504291/how-to-speed-up-unzipping-time-in-android">How to speed up unzipping time in Android?</a>  </p>
</blockquote>



<p>I wrote this code to unzip files but it takes too much time to unzip even a small file of 20Kb. Any suggestions?</p>

<pre><code>package recycle.pack.age;

import android.util.Log; 
import java.io.File; 
import java.io.*; 
import java.util.zip.*; 


public class Decompress { 
private String _zipFile; 
private String _location; 

public Decompress(String zipFile, String location) { 
    _zipFile = zipFile; 
    _location = location; 

    _dirChecker(""); 
} 

public void unzip() { 
try  { 

      FileInputStream fin = new FileInputStream(_zipFile); 
      ZipInputStream zin = new ZipInputStream(fin); 
      ZipEntry ze = null; 
      while ((ze = zin.getNextEntry()) != null) { 
        Log.v("Decompress", "Unzipping" + ze.getName()); 

      if(ze.isDirectory()) { 
      _dirChecker(ze.getName()); 
    } 
    else { 
      FileOutputStream fout = new FileOutputStream(_location +   ze.getName()); 
        for (int c = zin.read(); c != -1; c = zin.read()) { 
        fout.write(c); 
      } 

        zin.closeEntry(); 
        fout.close(); 
      } 

   } 
    zin.close(); 
  } catch(Exception e) { 
    Log.e("Decompress", "unzip", e); 
  } 

  } 

 private void _dirChecker(String dir) { 
  File f = new File(_location + dir); 

    if(!f.isDirectory()) { 
    f.mkdirs(); 
    } 
  } 
} 
</code></pre>
