title: Unzip Error java.io.EOFException with java unzip code
body: <p>i am getting this error when i try to unzip a large zip file of about 56MB it works fine for smaller zip files. still new to java so take it easy on me please</p>
  
  <pre><code>java.io.EOFException: Unexpected end of ZLIB input stream
  at java.util.zip.InflaterInputStream.fill(Unknown Source)
  at java.util.zip.InflaterInputStream.read(Unknown Source)
  at java.util.zip.ZipInputStream.read(Unknown Source)
  at java.io.FilterInputStream.read(Unknown Source)
  at UnZip.unZipIt(UnZip.java:62)
  at UnZip.main(UnZip.java:23)
  </code></pre>
  
  <p>and the code i am using that gives me this:</p>
  
  <pre><code>import java.io.BufferedOutputStream;
  import java.io.File;
  import java.io.FileInputStream;
  import java.io.FileOutputStream;
  import java.io.IOException;
  import java.util.List;
  import java.util.zip.ZipEntry;
  import java.util.zip.ZipInputStream;
  
  
  
  
  
  public class UnZip
  {
      List&lt;String&gt; fileList;
      private static final String INPUT_ZIP_FILE = "PAQ-Temp/Downloads/mods.zip";
      private static final String OUTPUT_FOLDER = "PAQ-Temp/images";
  
      public static void main( String[] args )
      {
          UnZip unZip = new UnZip();
          unZip.unZipIt(INPUT_ZIP_FILE,OUTPUT_FOLDER);
      }
  
  
        //Unzip it
        //@param zipFile input zip file
        //@param output zip file output folder
  
      public void unZipIt(String zipFile, String outputFolder){
  
      byte[] buffer = new byte[104512585];
  
       try{
  
          //create output directory is not exists
          File folder = new File(OUTPUT_FOLDER);
          if(!folder.exists()){
              folder.mkdir();
          }
  
          //get the zip file content
          ZipInputStream zis = new ZipInputStream(new FileInputStream(zipFile));
          //get the zipped file list entry
          ZipEntry ze = zis.getNextEntry();
  
          while(ze!=null){
  
             String fileName = ze.getName();
             File newFile = new File(outputFolder + File.separator + fileName);
  
             System.out.println("file unzip : "+ newFile.getAbsoluteFile());
  
              //create all non exists folders
              //else you will hit FileNotFoundException for compressed folder
              new File(newFile.getParent()).mkdirs();
  
              FileOutputStream fos = new FileOutputStream(newFile);             
  
              int len;
              while ((len = zis.read(buffer)) &gt; 0) {
              fos.write(buffer, 0, len);
              }
  
              fos.close();   
              ze = zis.getNextEntry();
          }
  
          zis.closeEntry();
          zis.close();
  
          System.out.println("Done unziping");
  
      }catch(IOException ex){
         ex.printStackTrace(); 
      }
     }   
  } 
  </code></pre>
  
  <p>edit:
  zip is valid tested with 7zip and windows unzipping both </p>