buffer: add a.equals(b) and a.compare(b)