@Override
  protected void writeReceived(DataOutput out) throws IOException {
    LinkedList<Long> deltas = new LinkedList<>();
    long last = nextVersion;

    // TODO - it would be better just to serialize the longs[] in the BitSet
    // as is, rather than go through this delta encoding.
    for (ReceivedVersionsReverseIterator it = receivedVersionsReverseIterator(); it.hasNext();) {
      long version = it.next();
      deltas.addFirst(last - version);
      last = version;
    }
    InternalDataSerializer.writeUnsignedVL(deltas.size(), out); // Number of received versions

    // Last version is the oldest received version, still need the delta from there to previous
    deltas.addFirst(last - previousVersion);

    for (long value : deltas) {
      InternalDataSerializer.writeUnsignedVL(value, out);
    }
  }
checks to see if any of the received versions can be merged into the start/end version numbers
geode-core/src/main/java/org/apache/geode/internal/cache/versions/RVVExceptionB.java