Hi all.
Well, i want to delete some bytes from start and at the end of untyped files.
I dont have problems with deleteing it from end of file. For example i want to delete 5 bytes from EOF. This is my method:
Code:
seek(f,filesize(f));
seek(f,filepos(f)-5);
truncate(f)
Works OK for me. Deletes 5 byte from end of file.
But how to delete bytes from start of file? Because probably that "minus some bytes" does not work??
I have to work with really big files (~700-1GB).
All i need to is delete some bytes from beginning of file and leave other bytes like they are. The bytes i delete i will replace with my own bytes. But biggest problem is how to delete bytes from beginning of file so that other bytes are untouched?
Any ideas, algos?
thx in advance.
Bookmarks