What is the best way to store incremental downloaded data?

Posted by afriza on Stack Overflow See other posts from Stack Overflow or by afriza
Published on 2010-04-07T02:41:12Z Indexed on 2010/04/07 2:43 UTC
Read the original article Hit count: 153

Filed under:

Inspired by Chromium's sha1 class, I am thinking to store incrementally downloaded data using std::string

// pseudo-code
char buff[BUFF_SIZE];
std::string data;
do {
    size = ReadInternetFileTo(buff,BUFF_SIZE);
} while (not_finished);

Any foreseeable problems with this method or better way to do it?

© Stack Overflow or respective owner

Related posts about c++

Related posts about stl