diff options
author | Patrick Simianer <p@simianer.de> | 2014-06-15 03:50:43 +0200 |
---|---|---|
committer | Patrick Simianer <p@simianer.de> | 2014-06-15 03:50:43 +0200 |
commit | 6ed9a9699997a2853ec1c9e91747c251e5cfc97b (patch) | |
tree | 56c96f18442fb06aeeb45cadc56355353a63ee99 /ccc/compression_test.cc | |
parent | 258e1b92ebbfdebefabc120969ab87c3d8b75c3d (diff) |
damn
Diffstat (limited to 'ccc/compression_test.cc')
-rw-r--r-- | ccc/compression_test.cc | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/ccc/compression_test.cc b/ccc/compression_test.cc deleted file mode 100644 index 21bfafc..0000000 --- a/ccc/compression_test.cc +++ /dev/null @@ -1,45 +0,0 @@ -#include <iostream> -#include <fstream> -#include <boost/iostreams/device/file.hpp> -#include <boost/iostreams/filter/zlib.hpp> -#include <boost/iostreams/filter/bzip2.hpp> -#include <boost/iostreams/filter/gzip.hpp> -#include <boost/iostreams/filtering_stream.hpp> - -using namespace boost::iostreams; -using namespace std; - - -int main(void) -{ - //ofstream raw("out-raw"); - filtering_ostream out_z; - out_z.push(gzip_compressor()); - //out_gz.push(gzip_compressor()); - out_z.push(file_sink("out-z", std::ios::binary)); - //out_gz.push(file_sink("out-gz", std::ios::binary)); - for (size_t i = 0; i < 10; i++) { - out_z << "line #" << i << endl; - //out_gz << "line #" << i << endl; - //out_bz << "line #" << i << endl; - //raw << "line #" << i << endl; - } - // flush(out); - close(out_z); - //close(out_gz); - //close(out_bz); - //raw.close(); - - for (size_t i = 0; i < 5; i++) { - ifstream file("out-z", ios_base::in | ios_base::binary); - filtering_istream in; - in.push(gzip_decompressor()); - in.push(file); - string s; - while (getline(in, s)) { - cout << s << endl; - } - file.close(); - } -} - |