Re: Adding/Removing bytes from the beginning of a file

new topic     » goto parent     » topic index » view thread      » older message » newer message

Well, the initial idea when I started this thread was prepending bytes and removing bytes from a file, but from the answers I got I realised that this is not convenient at all, and may also lead to troubles.

So my current task is: overwriting the first few bytes of a file (containing the file signature, a.k.a. magic number, or simply header) and then, later on, overwriting them again, back to their original state. I already got the info about doing this, thanks to Pete.

Now, the only question unanswered is: will this simple byte-overwriting process (without any truncation or prepending) entail also a complete re-writing of the whole file on the disk when the file is updated? Or will those few bytes alone be modified on the disk (which indeed is my desired outcome)? There are significant performance issues involved, especially in the case of huge files. That's why I am asking.

Thanks again to all.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu