private static void UnZip(String ZipName,long fileSize, ProgressBar progressCurr,ProgressBar progressBarTotal) throws PrivilegedActionException
  {
     
    String szZipFilePath;
    String szExtractPath;
    String path = (String)AccessController.doPrivileged(new PrivilegedExceptionAction<Object>() {
        public Object run() throws Exception {
          return Utils.GetCurrentClientDir() + File.separator + ".minecraft" + File.separator;
        }
      }); 
    int i;
    
    szZipFilePath = path + ZipName;
      
    File f = new File(szZipFilePath);
    
    if(!f.exists())
    {
      System.out.println(
	"\nNot found: " + szZipFilePath);
    }
      
    if(f.isDirectory())
    {
      System.out.println(
	"\nNot file: " + szZipFilePath);
    }
    
    //System.out.println("Enter path to extract files: ");
    szExtractPath = path;
    
    File f1 = new File(szExtractPath);
    if(!f1.exists())
    {
      System.out.println(
	"\nNot found: " + szExtractPath);
    }
      
    if(!f1.isDirectory())
    {
      System.out.println(
	"\nNot directory: " + szExtractPath);
    }
    
    ZipFile zf; 
    Vector zipEntries = new Vector();
       
    try
    {  
      zf = new ZipFile(szZipFilePath); 
      
      
      Enumeration en = zf.entries();
      
      while(en.hasMoreElements())
      {
        zipEntries.addElement(
	  (ZipEntry)en.nextElement());
      }
      int sizetemp = 1;
      double oldpercentTotal = 0.0;
      double currFilePercent = 0.0;
      for (i = 0; i < zipEntries.size(); i++)
      {
        ZipEntry ze = 
	  (ZipEntry)zipEntries.elementAt(i);
        
        
        sizetemp +=ze.getCompressedSize();
        try{
        currFilePercent =     ((sizetemp /1024) *100/fileSize)/100;
        progressCurr.setProgress(currFilePercent);
        //progressCurr.setString("Извлечение "+ZipName + "  "+progressCurr.getValue()+"%");
        CurentTotalProgress += (  ((sizetemp/1024)*100/totalsize)-oldpercentTotal  )/100 ;
        progressBarTotal.setProgress(CurentTotalProgress);
        oldpercentTotal = ((sizetemp/1024)*100/totalsize);
        }catch(ArithmeticException ae){
            
        }
        
        extractFromZip(szZipFilePath, szExtractPath,
	  ze.getName(), zf, ze);
      }
      
      zf.close();
      //System.out.println("Done!");
    }
    catch(Exception ex)
    {
      System.out.println(ex.toString());
    }
    f.delete();
  }