code: int compare(ByteArraySegment b1, ByteArraySegment b2) {
          assert b1.getLength() == b2.getLength();
          return compare(b1.array(), b1.arrayOffset(), b2.array(), b2.arrayOffset(), b1.getLength());
      }
docs: Compares two non-null ByteArraySegments of the same length using lexicographic bitwise comparison.
  
  @param b1 First instance.
  @param b2 Second instance.
  @return -1 if b1 should be before b2, 0 if b1 equals b2 and 1 if b1 should be after b2.