Could you help to understand generally how the applying of patch or an update works for already compiled and live application at the level of code?
I mean, if we want to fix an error (or improve a functionality) in some piece of code, what is happening with that already compiled code, how it gets changed?
What you talk about is done with a binary diff algorithm.
Such an algorithm finds the differences between the existing binary file and the target binary file. That is usually a lot less space than sending the whole file again, thus it’s faster. Speed is relevant if the updates you push are security related, becasue the faster clients get patched the less window of opportunity exploits have.
See this and this for the latest and greatest on binary diff algorithm implementations for compiled executables.