code: int compare(byte[] b1, int offset1, byte[] b2, int offset2, int length) {
          int r;
          for (int i = 0; i < length; i++) {
              // Unsigned comparison mimics bitwise comparison.
              r = (b1[offset1 + i] & 0xFF) - (b2[offset2 + i] & 0xFF);
              if (r != 0) {
                  return r;
              }
          }
  
          return 0;
      }
docs: Compares two byte arrays from the given offsets using lexicographic bitwise comparison.
  
  @param b1      First array.
  @param offset1 The first offset to begin comparing in the first array.
  @param b2      Second array.
  @param offset2 The first offset to begin comparing in the second array.
  @param length  The number of bytes to compare.
  @return -1 if b1 should be before b2, 0 if b1 equals b2 and 1 if b1 should be after b2.