@Override public void setDocument(int docId) { bytes = values.get(docId); in.reset(bytes.bytes, bytes.offset, bytes.length); if (!in.eof()) { // first value uses vLong on top of zig-zag encoding, then deltas are encoded using vLong long previousValue = longs[0] = ByteUtils.zigZagDecode(ByteUtils.readVLong(in)); count = 1; while (!in.eof()) { longs = ArrayUtil.grow(longs, count + 1); previousValue = longs[count++] = previousValue + ByteUtils.readVLong(in); } } else { count = 0; } }