Ticket #2783: hello.cc

File hello.cc, 467 bytes (added by Mark Westcott <markboost@…>, 14 years ago)
Line 
1#include <fstream>
2#include <iostream>
3#include <boost/iostreams/filtering_streambuf.hpp>
4#include <boost/iostreams/copy.hpp>
5#include <boost/iostreams/filter/bzip2.hpp>
6int main()
7{
8 using namespace std;
9 using namespace boost;
10 using namespace boost::iostreams;
11 ifstream file("hello.bz2", ios_base::in | ios_base::binary);
12 filtering_streambuf<input> in;
13 in.push(bzip2_decompressor());
14 in.push(file);
15 boost::iostreams::copy(in, cout);
16}