Yes, entire files are rewritten when you update a sequential file. The Microsoft .docx file is a zipped XML file, i.e. effectively text, and operates the same way.
By treating a text file as a random-access binary file you can perform some limited in-place updates of mid-file content but nothing that changes the size of the portion you are replacing. The Qt binary installer does something like this to update the various Qt install paths embedded in the Qt libraries: corelib/global/qconfig.cpp holds a preallocated, fixed-size buffer for each path and the installer writes the actual installed path into that space in the QtCore library binary file without rewriting the entire file.




Reply With Quote

Bookmarks