Ticket #4554: test.cpp
File test.cpp, 462 bytes (added by , 12 years ago) |
---|
Line | |
---|---|
1 | #include <string> |
2 | #include <iostream> |
3 | #include <boost/iostreams/filtering_stream.hpp> |
4 | #include <boost/iostreams/filter/gzip.hpp> |
5 | |
6 | using namespace boost::iostreams; |
7 | using namespace boost::iostreams::gzip; |
8 | |
9 | int main() { |
10 | filtering_istream stream_in; |
11 | stream_in.push(gzip_decompressor()); |
12 | stream_in.push(std::cin); |
13 | |
14 | std::istream& std_stream = stream_in; |
15 | |
16 | while(!std_stream.eof()) { |
17 | std::string s; |
18 | getline(std_stream, s); |
19 | std::cout << s << std::endl; |
20 | } |
21 | } |