|
Boost Users : |
From: Holger Bast (bast_at_[hidden])
Date: 2008-02-14 02:40:11
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
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net