1#include "zipios++/zipios-config.h"
3#include "zipios++/meta-iostreams.h"
9using namespace zipios ;
20void 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 ;
40void 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 ;
GZIPOutputStream is an ostream that writes the output to a gz file.
Header file that defines GZIPOutputStream.