On 22/9/01 6:58 am, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> 1) is there a way to chunk read from a file?
Yes. If the files are small or memory isn't an issue, you can simply use
the URL commands to access the file using chunk expressions.
E.g.:
put word 2 of line 125 of URL ("file:" & tFilePath)
put "the text" into line 99 of URL ("file:" & tFilePath)
If you're working with a really large file, you'll want to use the more
traditional open, read write and seek commands to access the file so it
doesn't all get read into memory, instead. Off the top of my head,
something like:
open file tFilePath for update
repeat
read from file tFilePath for 1000
if it is empty then
exit repeat
else
--do something with variable "it"
end if
end repeat
> 2) does the results of base64 encoding of chunk reading result in the same
> output as base64 encoding the whole file?
I would expect so - but you might want to test that to be sure.
> i'm just wondering so my email cient doesn't require a 1 gig of RAM to handle
> attachments..
You should be able to do this with the latter type syntax if the files are
really huge!
Regards,
Kevin
Kevin Miller <[EMAIL PROTECTED]> <http://www.runrev.com/>
Runtime Revolution Limited - Power to the Developer!
Tel: +44 (0)131 718 4333. Fax: +44 (0)1639 830 707.