Exactly what is said here. Though, this can be done in an automated way using 010 editor scripts. What you need to do is to rewrite the mentioned chunks in the file. I suggest reading it first somewhere, modifying it with your functions, calculating delta size and moving all futher offsets accordingly, inserting the new data instead of the new one.