A library for working with phylogenetic and population genetic data.
GzipOFStream Class Reference

#include <genesis/utils/io/gzip_stream.hpp>

Inherits StrictFStreamHolder< StrictOFStream >, and ostream.

Detailed Description

Out file stream that offers on-the-fly gzip-compression.

The class accesses an internal std::ofstream. This can be used to open a file and write compressed data to it.

If genesis is compiled without zlib support, constructing an instance of this class will throw an exception.

See also

Definition at line 313 of file gzip_stream.hpp.

Public Member Functions

 GzipOFStream (std::string const &filename, std::ios_base::openmode mode=std::ios_base::out, GzipCompressionLevel level=GzipCompressionLevel::kDefaultCompression, std::size_t buffer_size=GZIP_DEFAULT_BUFFER_SIZE)
virtual ~GzipOFStream ()
GzipOFStreamflush ()
 Flush, so one can save in the middle of writing a file for synchronization purposes. More...

Constructor & Destructor Documentation

◆ GzipOFStream()

GzipOFStream ( std::string const &  filename,
std::ios_base::openmode  mode = std::ios_base::out,
GzipCompressionLevel  level = GzipCompressionLevel::kDefaultCompression,
std::size_t  buffer_size = GZIP_DEFAULT_BUFFER_SIZE 

Definition at line 565 of file gzip_stream.cpp.

◆ ~GzipOFStream()

~GzipOFStream ( )

Definition at line 577 of file gzip_stream.cpp.

Member Function Documentation

◆ flush()

GzipOFStream & flush ( )

Flush, so one can save in the middle of writing a file for synchronization purposes.

Definition at line 584 of file gzip_stream.cpp.

The documentation for this class was generated from the following files: