code: public EntryStream<T, Long> runLengths() {
          return new EntryStream<>(collapseInternal(Objects::equals, t -> new ObjLongBox<>(t, 1L), (acc, t) -> {
              acc.b++;
              return acc;
          }, (e1, e2) -> {
              e1.b += e2.b;
              return e1;
          }), context);
      }
docs: Collapses adjacent equal elements and returns an {@link EntryStream}
  where keys are input elements and values specify how many elements were
  collapsed.
  
  <p>
  This is a <a href="package-summary.html#StreamOps">quasi-intermediate</a>
  partial reduction operation.
  
  <p>
  For sorted input {@code runLengths().toMap()} is the same as
  {@code groupingBy(Function.identity(), Collectors.counting())}, but may
  perform faster. For unsorted input the resulting stream may contain
  repeating keys.
  
  @return the new stream
  @since 0.3.3