@Override
    public int sizeOf(Object o) {
        if (o == null) {
            return 1;
        }
        Object[] objs = (Object[]) o;
        int size = ByteUtils.sizeOfUnsignedVarint(objs.length + 1);
        for (Object obj : objs) {
            size += type.sizeOf(obj);
        }
        return size;
    }
Represents a type for a compact array of a particular type.
A compact array represents its length with a varint rather than a
fixed-length field.
clients/src/main/java/org/apache/kafka/common/protocol/types/CompactArrayOf.java