'what is the algorithm to detect modified chunks in a drop down like system

below is the most common high level design for dropbox/google drive enter image description here

How does the chunker, on client side, know what chunk is modified? if a 10 mb file had been divided into 5 chunks of 2mb size and then some changes were done at the beginning of the file. how would the chunker know that only the beginning of the file is changed? how does it recalculate the new chunks?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source