|
A library for working with phylogenetic and population genetic data.
v0.32.0
|
|
Go to the documentation of this file. 1 #ifndef GENESIS_UTILS_IO_GZIP_STREAM_H_
2 #define GENESIS_UTILS_IO_GZIP_STREAM_H_
149 :
public std::istream
155 bool auto_detect =
true,
160 std::streambuf * sbuf_p,
161 bool auto_detect =
true,
194 :
public std::ostream
205 std::streambuf* sbuf_p,
232 template <
typename FStreamType >
278 ,
public std::istream
283 std::string
const& filename,
284 std::ios_base::openmode mode = std::ios_base::in,
285 bool auto_detect =
true,
315 ,
public std::ostream
320 std::string
const& filename,
321 std::ios_base::openmode mode = std::ios_base::out,
337 #endif // include guard
Helper class template for managing the construction order between stream classes.
GzipOStream(std::ostream &os, GzipCompressionLevel level=GzipCompressionLevel::kDefaultCompression, std::size_t buffer_size=GZIP_DEFAULT_BUFFER_SIZE)
StrictFStreamHolder(std::string const &filename, std::ios_base::openmode mode=std::ios_base::in)
Input file stream that offers on-the-fly gzip-decompression if needed.
GzipOFStream & flush()
Flush, so one can save in the middle of writing a file for synchronization purposes.
GzipCompressionLevel
List of possible compression levels used for GzipOStream.
Input stream that offers on-the-fly gzip-decompression if needed.
GzipIStream(std::istream &is, bool auto_detect=true, std::size_t buffer_size=GZIP_DEFAULT_BUFFER_SIZE)
static const std::size_t GZIP_DEFAULT_BUFFER_SIZE
Default buffer size for all gzip (de)compression buffers.
Container namespace for all symbols of genesis in order to keep them separate when used as a library.
Out file stream that offers on-the-fly gzip-compression.
GzipIFStream(std::string const &filename, std::ios_base::openmode mode=std::ios_base::in, bool auto_detect=true, std::size_t buffer_size=GZIP_DEFAULT_BUFFER_SIZE)
Output stream that offers on-the-fly gzip-compression.
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)