[C][Files]Add something without replacing
#1

Hello
I ask for your help about this:
I want add something in a file, e.g. a variable at X position of a file, but I don't want replace the current content that is there (at that position), only add that content (binary content). There is a way which I can add something without replacing the existing content?
I could create a temporary file or something like that but the files have a big size, greater than 1 GB.
Thanks in advance
Reply
#2

With what? PHP? PAWN? Give more detail if you want help.
Reply
#3

Quote:
Originally Posted by Potassium
Посмотреть сообщение
With what? PHP? PAWN? Give more detail if you want help.
Hint:
Quote:

[C][Files]Add something without replacing

Reply
#4

Afaik this isnt possible. The only way would be the temporary file you mentioned, or buffering in ram, but thats also rather bad for big files.
Reply
#5

mah bad
Reply
#6

Quote:
Originally Posted by Mauzen
Посмотреть сообщение
Afaik this isnt possible. The only way would be the temporary file you mentioned, or buffering in ram, but thats also rather bad for big files.
It seems that for this operation, it will take more time than I have expected, only for add a bit of code
Furthermore How many amount of RAM should I use for read the file data? I have been using blocks of 2 MB. The read and write operation takes about 40 seconds for a 1 GB file.
Reply
#7

2mb already sounds good. In general, the bigger the blocks, the faster it writes the file (but needs more ram in that time of course). Most HDDs got 32mb cache, thats where it gets pretty close to the maximum speed, and 32mb ram usage is still fine i guess.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)