I need to create and after update (append) a binary file (images). The issue is that I don't want to open the file, get the binary information, append the new information and create a new file. I really need to protect the performance.
First find out what has to be updated. If you can update the file in place, then do so. If you can't do that, then you will have to create a new file. Vague ideas like "protect the performance" seem to be interfering with that process, so try to avoid them.