14 Feb
2008
14 Feb
'08
7:40 a.m.
I want to read line by line from a gzipped document. I first do: std::ifstream file(fileName.c_str()); boost::iostreams::filtering_streambuf<boost::iostreams::input> in; in.push(boost::iostreams::gzip_decompressor()); in.push(documentFile); However, then the obvious: string line; while(std::getline(in, line)) { ... } does not compile. Is there really no getline for filtering_streambuf? If not, what is the best way to write one? I tried reading character by character using boost::iostream::get(in) but that looks terribly inefficient to me, and is not nice code. Thanks for your help, Holger