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: 281

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);
    data.append(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