code: public static Mono<Path> compress(Path candidate, Predicate<String> filter) {
          return Mono
              .defer(() -> {
                  try {
                      Path staging = Files.createTempFile(String.format("compressed-%s-", candidate.getFileName()), ".zip");
  
                      try (ZipArchiveOutputStream out = new ZipArchiveOutputStream(staging.toFile())) {
                          if (Files.isDirectory(candidate)) {
                              compressFromDirectory(candidate, filter, out);
                          } else {
                              compressFromZip(candidate, filter, out);
                          }
                      }
  
                      return Mono.just(staging);
                  } catch (IOException e) {
                      throw Exceptions.propagate(e);
                  }
              })
              .subscribeOn(Schedulers.elastic());
      }
docs: Compresses a candidate {@link Path} filtering out entries
  
  @param candidate the candidate {@link Path} to compress
  @param filter    a filter applied to each path
  @return the {@link Path} for a compressed artifact