30 #include <boost/iostreams/filtering_stream.hpp>
31 #include <boost/iostreams/filter/gzip.hpp>
32 #include <boost/iostreams/device/file_descriptor.hpp>
33 #include <boost/iostreams/copy.hpp>
36 using namespace pwiz::util;
38 using namespace pwiz::data;
39 using namespace pwiz::tradata;
53 if (!sws.empty()) sws.erase(sws.end()-1);
60 if (
os_) *
os_ <<
"test()\n " << writeConfig << endl;
79 if (diff &&
os_) *
os_ << diff << endl;
83 td1.
write(filename2, writeConfig);
91 if (diff &&
os_) *
os_ << diff << endl;
95 bio::filtering_istream tinyGZ(bio::gzip_compressor() | bio::file_descriptor_source(filename1));
96 bio::copy(tinyGZ, bio::file_descriptor_sink(filename1+
".gz", ios::out|ios::binary));
103 if (diff &&
os_) *
os_ << diff << endl;
108 boost::filesystem::remove(filename1);
109 boost::filesystem::remove(filename2);
110 boost::filesystem::remove(filename1 +
".gz");
114 int main(
int argc,
char* argv[])
120 if (argc>1 && !strcmp(argv[1],
"-v"))
os_ = &cout;