private int moveRecords(int index, int offset) {

		int lastIndex = keyCount - 1;

		// No movement needed for appended record
		if (index == keyCount) {
			if (index == 0) {
				return buffer.length() + offset;
			}
			return getRecordKeyOffset(lastIndex) + offset;
		}

		// Determine block to be moved
		int start = getRecordKeyOffset(lastIndex);
		int end = (index == 0) ? buffer.length() : getRecordKeyOffset(index - 1);
		int len = end - start;

		// Move record data
		buffer.move(start, start + offset, len);

		// Adjust stored offsets
		for (int i = index; i < keyCount; i++) {
			putRecordKeyOffset(i, getRecordKeyOffset(i) + offset);
		}
		return end + offset;
	}
Move all records from index to the end by the specified offset.
@param index the smaller key index (0 &lt;= index1)
@param offset movement offset in bytes
@return insertion offset immediately following moved block.
Ghidra/Framework/DB/src/main/java/db/VarKeyRecordNode.java