public long[] read(Unpacker u, long[] to, boolean required)
            throws IOException {
        if (!required && u.trySkipNil()) {
            return null;
        }
        int n = u.readArrayBegin();
        if (to == null || to.length != n) {
            to = new long[n];
        }
        for (int i = 0; i < n; i++) {
            to[i] = u.readLong();
        }
        u.readArrayEnd();
        return to;
    }