sclass HashedByteArray is Comparable { byte[] data; int hashCode; *() {} *(byte[] *data) {} public int hashCode() { if (hashCode == 0) hashCode = oneIfZero(arrayHashCode(data)); ret hashCode; } public bool equals(O o) { if (o cast HashedByteArray) ret this == o || hashCode() == o.hashCode() && byteArraysEqual(data, o.data); false; } // we interpret the bytes as ubytes public int compareTo(HashedByteArray a) { ret Arrays.compareUnsigned(data, a.data); } toString { ret bytesToHex(data); } }