September 11th, 2009, 11:25 PM
can i modify a file without load the file in?
if i have a very large binary file, i only need to modify only value inside, can i do this without loading the file in? how?
September 11th, 2009, 11:55 PM
Re: can i modify a file without load the file in?
Presuming you're replacing a fixed number of bytes at a known byte offset with the same number of bytes, you can simply seek to that location and write over what's there.
If you want to write a different number of bytes than are present at that location, you'll need to read in at least the part of the file after that, so you can write it out again bumped over to the right place.
Tags for this Thread
Click Here to Expand Forum to Full Width