Viewing file: test__gzipoutputstream_8cpp_source.html (13.99 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
Zipios++: test_gzipoutputstream.cpp Source File
Go to the documentation of this file. 1 #include "zipios++/zipios-config.h"
3 #include "zipios++/meta-iostreams.h"
9 using namespace zipios ;
18 using std::exception ;
20 void writeFileToGZIPOutputStream( GZIPOutputStream &zos, const string &filename ) ;
27 writeFileToGZIPOutputStream( ozs, "test.xml" ) ;
29 cerr << "End of main" << endl ;
33 catch( exception &excp ) {
34 cerr << "Exception caught in main() :" << endl ;
35 cerr << excp.what() << endl ;
40 void writeFileToGZIPOutputStream( GZIPOutputStream &zos, const string &filename ) {
42 ifstream ifs( filename.c_str(), ios::in | ios::binary ) ;
44 zos.setFilename(filename);
45 zos.setComment( "ZIPIOS++ TestFile");
48 cerr << "ostream Stream state: " ;
49 cerr << "good() = " << zos.good() << ",\t" ;
50 cerr << "fail() = " << zos.fail() << ",\t" ;
51 cerr << "bad() = " << zos.bad() << ",\t" ;
52 cerr << "eof() = " << zos.eof() << endl ;
54 cerr << "istream Stream state: " ;
55 cerr << "good() = " << ifs.good() << ",\t" ;
56 cerr << "fail() = " << ifs.fail() << ",\t" ;
57 cerr << "bad() = " << ifs.bad() << ",\t" ;
58 cerr << "eof() = " << ifs.eof() << endl ;
|