docs: @SuppressWarnings("WeakerAccess")
      public static Path uncompress(final Path archiveFile, final Path targetDir, final boolean replaceIfExists) throws IOException {
          final Path archive = getArchive(archiveFile);
  
          Path firstDir = null;
  
          try (ArchiveInputStream in = new ArchiveStreamFactory().createArchiveInputStream(new BufferedInputStream(Files.newInputStream(archive)))) {
              ArchiveEntry entry;
              while ((entry = in.getNextEntry()) != null) {
                  final Path extractTarget = targetDir.resolve(entry.getName());
                  if (!replaceIfExists && Files.exists(extractTarget)) {
                      if (entry.isDirectory() && firstDir == null) {
                          firstDir = extractTarget;
                      }
                      continue;
                  }
                  if (entry.isDirectory()) {
                      final Path dir = Files.createDirectories(extractTarget);
                      if (firstDir == null) {
                          firstDir = dir;
                      }
                  } else {
                      Files.createDirectories(extractTarget.getParent());
                      Files.copy(in, extractTarget);
                  }
              }
              return firstDir == null ? targetDir : firstDir;
          } catch (ArchiveException e) {
              throw new IOException(e);
          }
      }