private static void unzipEntryToDir(@Nullable ProgressIndicator progress,
                                      @NotNull final ZipEntry zipEntry,
                                      @NotNull final InputStream entryContentStream,
                                      @NotNull Path extractToDir,
                                      @Nullable NullableFunction<? super String, String> pathConvertor,
                                      @Nullable ContentProcessor contentProcessor) throws IOException {
    String relativeExtractPath = createRelativeExtractPath(zipEntry);
    if (pathConvertor != null) {
      relativeExtractPath = pathConvertor.fun(relativeExtractPath);
      if (relativeExtractPath == null) {
        // should be skipped
        return;
      }
    }
    Path child = Decompressor.entryFile(extractToDir, relativeExtractPath);
    Path dir = zipEntry.isDirectory() ? child : child.getParent();
    Files.createDirectories(dir);
    LOG.assertTrue(dir.toFile().exists());
    LOG.assertTrue(dir.toFile().listFiles() != null);
    if (zipEntry.isDirectory()) {
      return;
    }
    if (progress != null) {
      progress.setText2(LangBundle.message("progress.text.extracting.path", relativeExtractPath));
    }
    if (contentProcessor == null) {
      Files.copy(entryContentStream, child, StandardCopyOption.REPLACE_EXISTING);
    }
    else {
      byte[] content = contentProcessor.processContent(FileUtilRt.loadBytes(entryContentStream), child.toFile());
      if (content != null) {
        Files.write(child, content);
      }
    }
    LOG.info("Extract: " + relativeExtractPath);
  }
private static void unzipEntryToDir(@Nullable ProgressIndicator progress,
                                      @NotNull final ZipEntry zipEntry,
                                      @NotNull final InputStream entryContentStream,
                                      @NotNull Path extractToDir,
                                      @Nullable NullableFunction<? super String, String> pathConvertor,
                                      @Nullable ContentProcessor contentProcessor)