I know how
rsync works. My doubt is how does
rsync patches the parts which are different between source and destination file.
After calculating the block which is different, it sends that part to destination. Now how does the destination insert this in mid of file? Does it move all the subsequent bytes also because we can't insert (appending) byte in the mid of the file.
Suppose source :
suppose rsync detects that D is missing it send that to destination. Than how destination insert D in to the file. Whether it insert after C and move EFGH or it does something else efficient. Because in any programing language we can not insert bytes in the mid of a file without replacing.