code: public static FileUtils.FileCopyResult unzip(
        final ByteSource byteSource,
        final File outDir,
        final Predicate<Throwable> shouldRetry,
        boolean cacheLocally
    ) throws IOException
    {
      if (!cacheLocally) {
        try {
          return RetryUtils.retry(
              new Callable<FileUtils.FileCopyResult>()
              {
                @Override
                public FileUtils.FileCopyResult call() throws Exception
                {
                  return unzip(byteSource.openStream(), outDir);
                }
              },
              shouldRetry,
              DEFAULT_RETRY_COUNT
          );
        }
        catch (Exception e) {
          throw Throwables.propagate(e);
        }
      } else {
        final File tmpFile = File.createTempFile("compressionUtilZipCache", ZIP_SUFFIX);
        try {
          FileUtils.retryCopy(
              byteSource,
              tmpFile,
              shouldRetry,
              DEFAULT_RETRY_COUNT
          );
          return unzip(tmpFile, outDir);
        }
        finally {
          if (!tmpFile.delete()) {
            log.warn("Could not delete zip cache at [%s]", tmpFile.toString());
          }
        }
      }
    }
docs: Unzip the byteSource to the output directory. If cacheLocally is true, the byteSource is cached to local disk before unzipping.
  This may cause more predictable behavior than trying to unzip a large file directly off a network stream, for example.
  * @param byteSource The ByteSource which supplies the zip data
  
  @param byteSource   The ByteSource which supplies the zip data
  @param outDir       The output directory to put the contents of the zip
  @param shouldRetry  A predicate expression to determine if a new InputStream should be acquired from ByteSource and the copy attempted again
  @param cacheLocally A boolean flag to indicate if the data should be cached locally
  
  @return A FileCopyResult containing the result of writing the zip entries to disk
  
  @throws IOException