/** * Optimization hook. */ public int compare(byte[] b1, int s1, int l1, byte[] b2, int s2, int l2) { int thisLeftValue = readInt(b1, s1); int thatLeftValue = readInt(b2, s2); if (thisLeftValue == thatLeftValue) { int n1 = WritableUtils.decodeVIntSize(b1[s1 + 4]); int n2 = WritableUtils.decodeVIntSize(b2[s2 + 4]); return compareBytes(b1, s1 + 4 + n1, l1 - n1 - 4, b2, s2 + n2 + 4, l2 - n2 - 4); } return (thisLeftValue < thatLeftValue ? -1 : (thisLeftValue == thatLeftValue ? 0 : 1)); } }