From: | Blitzwing |
Date: | 17 Sep 99 at 01:58:14 |
Subject: | Re: Readfile |
Greetings Bippy you were dribbling something about
On 17-Sep-99, you wrote:
> Hiya Guys,
>
> okay I need to edit a file using a patch file.. now the file I'm editing
> is 35Mb(ish) and I only have 18Mb mem would readfile handle this? If not
> how do I get around this problem?
>
I assume you're putting patches over file information, not inserting new
information (ie making the file longer), if so I'd do something like open
the file as random access, make it read 256 bytes into a string, noting the
offset and patch the string, write it back. I'd vary the string size for
speed, beyond about 4k strings might get a little slow on manipulation.
Alternatively you could do an array of strings thus working in larger
chunks
> Also The patch format is 4byte offset, 1byte for num bytes to patch and
> then num bytes for patch eg..
>
> xxxx,y,zzzz xxxx=offset in file, y=number of bytes to patch zzzz is the
> patched data (Which is equal num of bytes to z) so..
>
> 001fd83a0523fe0eacd4
>
> would translate to
>
> File offset = 001fd83a
> bytes to patch = 05
> patch data = 23 fe 0e ac d4
>
> how would I get this info from the patch (Remember the patch /could/ be
> bigger than mem!!).. and also remember z could equal a max of 255!!!
>
> Cheers
>
> Mark
>
> T'ra
I'll go into mre details if you like the sound of ths idea. btw I used this
principle to work on databases several meg in size on an unexpanded a500
Blitzwing
Regards
---------------------------------------------------------------------
To unsubscribe, e-mail: blitz-list-unsubscribe@netsoc.ucd.ie
For additional commands, e-mail: blitz-list-help@netsoc.ucd.ie