private Set<ChangeId> decodeChanges(BinaryDecoder decoder) throws IOException {
int size = decoder.readInt();
HashSet<ChangeId> changes = Sets.newHashSetWithExpectedSize(size);
while (size != 0) { // zero denotes end of list as per AVRO spec
for (int remaining = size; remaining > 0; --remaining) {
changes.add(new ChangeId(decoder.readBytes()));
}
size = decoder.readInt();
}
// todo is there an immutable hash set?
return changes;