code: public static void compress(File dir, File zipFile) throws IOException {
  
      FileOutputStream fos = new FileOutputStream(zipFile);
      ZipOutputStream zos = new ZipOutputStream(fos);
  
      recursiveAddZip(dir, zos, dir);
  
      zos.finish();
      zos.close();
  
    }
docs: Compress a directory into a zip file
  
  @param dir Directory
  @param zipFile ZIP file to create
  @throws IOException I/O Error