A toolkit for working with phylogenetic data.
v0.24.0
GzipOutputTarget Class Referencefinal

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

Inherits BaseOutputTarget.

Detailed Description

Output target for writing byte data to a gzip/zlib-compressed target.

This output target is a wrapper that takes some other output target (FileOutputTarget, StringOutputTarget, StreamOutputTarget, etc), and compresses using the gzip format on the fly while writing to that other target.

The class can be moved, but not copied, because of the internal state that is kept for compression, and which would mess up the output if copied.

Definition at line 59 of file gzip_output_target.hpp.

Public Member Functions

 GzipOutputTarget (std::shared_ptr< BaseOutputTarget > output_target, GzipCompressionLevel level=GzipCompressionLevel::kDefaultCompression)
 Construct the output target using another output target (FileOutputTarget, StringOutputTarget, StreamOutputTarget, etc), and add gzip/zlib compression on top, using the specified GzipCompressionLevel%. More...
 
 GzipOutputTarget (GzipOutputTarget const &)=delete
 
 GzipOutputTarget (GzipOutputTarget &&)=default
 
 ~GzipOutputTarget () override=default
 
GzipOutputTargetoperator= (GzipOutputTarget const &)=delete
 
GzipOutputTargetoperator= (GzipOutputTarget &&)=default
 
- Public Member Functions inherited from BaseOutputTarget
 BaseOutputTarget ()=default
 
 BaseOutputTarget (BaseOutputTarget const &)=default
 
 BaseOutputTarget (BaseOutputTarget &&)=default
 
virtual ~BaseOutputTarget ()
 
template<typename T >
BaseOutputTargetoperator<< (T const &content)
 Output stream operator template that simply forwards to the underlying ostream() object. More...
 
BaseOutputTargetoperator= (BaseOutputTarget const &)=default
 
BaseOutputTargetoperator= (BaseOutputTarget &&)=default
 
std::ostream & ostream ()
 Get the underlying output stream that is used for writing. More...
 
std::string target_name () const
 Get a name of the output target. This is intended for user output. More...
 
std::string target_string () const
 Get a string representing the output target. This is intended for the writer classes, which for example might want to examine the output file name. More...
 

Constructor & Destructor Documentation

◆ GzipOutputTarget() [1/3]

GzipOutputTarget ( std::shared_ptr< BaseOutputTarget output_target,
GzipCompressionLevel  level = GzipCompressionLevel::kDefaultCompression 
)
inlineexplicit

Construct the output target using another output target (FileOutputTarget, StringOutputTarget, StreamOutputTarget, etc), and add gzip/zlib compression on top, using the specified GzipCompressionLevel%.

Definition at line 72 of file gzip_output_target.hpp.

◆ GzipOutputTarget() [2/3]

GzipOutputTarget ( GzipOutputTarget const &  )
delete

◆ GzipOutputTarget() [3/3]

◆ ~GzipOutputTarget()

~GzipOutputTarget ( )
overridedefault

Member Function Documentation

◆ operator=() [1/2]

GzipOutputTarget& operator= ( GzipOutputTarget const &  )
delete

◆ operator=() [2/2]

GzipOutputTarget& operator= ( GzipOutputTarget &&  )
default

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