com.clearspring.analytics.util.UnsignedIntComparator Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of stream-lib Show documentation
Show all versions of stream-lib Show documentation
A library for summarizing data in streams for which it is infeasible to store all events
The newest version!
package com.clearspring.analytics.util;
import java.util.Comparator;
public class UnsignedIntComparator implements Comparator {
@Override
public int compare(byte[] left, byte[] right) {
int l = Varint.readUnsignedVarInt(left);
int r = Varint.readUnsignedVarInt(right);
return l - r;
}
}