bytesDifference
Compares two BytesRef, element by element, and returns the number of elements common to both arrays (from the start of each). This method assumes currentTerm comes after priorTerm.
Return
The number of common elements (from the start of each).