4 #include <filems/write/comps/SimpleSyncFileWriter.h>
5 #include <boost/iostreams/filtering_stream.hpp>
6 #include <boost/iostreams/filter/zlib.hpp>
7 #include <boost/archive/binary_oarchive.hpp>
9 namespace helios {
namespace filems {
12 using std::unique_ptr;
22 template <
typename ... WriteArgs>
35 boost::iostreams::zlib_params
zp;
39 unique_ptr<boost::archive::binary_oarchive>
oa;
52 int compressionMode = boost::iostreams::zlib::best_compression
55 path, ios_base::out | ios_base::binary
58 zp = boost::iostreams::zlib_params(compressionMode);
61 oa = std::unique_ptr<boost::archive::binary_oarchive>(
Abstract specialization of SingleSyncFileWriter to write output directly to a file.
Definition: SimpleSyncFileWriter.h:23
std::ofstream ofs
Output file stream to be used by the simple synchronous file writer.
Definition: SimpleSyncFileWriter.h:31
std::string path
Path to file to be written.
Definition: SingleSyncFileWriter.h:28
Abstract child of SimpleSyncFileWriter which provides support for zipped output.
Definition: ZipSyncFileWriter.h:23
ZipSyncFileWriter(const string &path, int compressionMode=boost::iostreams::zlib::best_compression)
Build a ZipSyncFileWriter.
Definition: ZipSyncFileWriter.h:50
void finish() override
ZipSyncFileWriter finishes the binary output archive instead of calling its parent finish method....
Definition: ZipSyncFileWriter.h:76
unique_ptr< boost::archive::binary_oarchive > oa
Binary output archive.
Definition: ZipSyncFileWriter.h:39
boost::iostreams::zlib_params zp
ZLib compression parameters.
Definition: ZipSyncFileWriter.h:35
boost::iostreams::filtering_ostream compressedOut
Compressed output stream.
Definition: ZipSyncFileWriter.h:31