probably not an Indy question

Giganews Newsgroups
Subject: probably not an Indy question
Posted by:  xdiscent (xdisce…@yahoo.com)
Date: Thu, 30 Dec 2004

This probably aint indy one..

How do I temporarily write data to disk while the download aint finished
yet?

A little snippet of my code
//SOC//
        TIdHTTP *IdHttpClient = new TIdHTTP(NULL);
        TMemoryStream *MStream = new TMemoryStream();

    IdHttpClient->Get(strUrl, MStream);
    MStream->SaveToFile(cFileName);
    MStream->Free();
//EOC//

Now I don't want the whole downloaded data to be staying in memory
(sometimes around 100mb). So i'm planning of append to file for every
1mb of data in MStream.

Any help?

Replies