Project
Loading...
Searching...
No Matches
o2::io::ocomp_stream Class Reference

#include <CompStream.h>

Inherits std::ostream.

Public Types

using streambuffer_t = boost::iostreams::filtering_streambuf< boost::iostreams::output >
 

Public Member Functions

 ocomp_stream (std::string filename, CompressionMethod method=CompressionMethod::None)
 
 ocomp_stream (std::ostream &backend, CompressionMethod method=CompressionMethod::None)
 
 ocomp_stream (std::string filename, std::string method)
 
 ocomp_stream (std::ostream &backend, std::string method)
 

Detailed Description

An ostream variant allowing to add compression filters.

This stream can be used transparently as std::ostream while providing compression directly on the backend stream/file.

Implementation is based on boost::iostreams utilities, the filtered_streambuf and compression filters. Currently supporting gzip, zlib, bzip2, and lzma algorithms. The algorithm is specified either by enum or string to the constructor.

Definition at line 95 of file CompStream.h.

Member Typedef Documentation

◆ streambuffer_t

using o2::io::ocomp_stream::streambuffer_t = boost::iostreams::filtering_streambuf<boost::iostreams::output>

Definition at line 98 of file CompStream.h.

Constructor & Destructor Documentation

◆ ocomp_stream() [1/4]

o2::io::ocomp_stream::ocomp_stream ( std::string  filename,
CompressionMethod  method = CompressionMethod::None 
)

constructor

Parameters
filenamename of the file to read from
methodcompression method specified by enum

Definition at line 129 of file CompStream.cxx.

◆ ocomp_stream() [2/4]

o2::io::ocomp_stream::ocomp_stream ( std::ostream &  backend,
CompressionMethod  method = CompressionMethod::None 
)

constructor

Parameters
backendthe stream to read data from
methodcompression method specified by enum

Definition at line 136 of file CompStream.cxx.

◆ ocomp_stream() [3/4]

o2::io::ocomp_stream::ocomp_stream ( std::string  filename,
std::string  method 
)

constructor

Parameters
filenamename of the file to read from
methodcompression method specified by string: gzip, zlib, bzip2, lzma

Definition at line 143 of file CompStream.cxx.

◆ ocomp_stream() [4/4]

o2::io::ocomp_stream::ocomp_stream ( std::ostream &  backend,
std::string  method 
)

constructor

Parameters
backendthe stream to read data from
methodcompression method specified by string: gzip, zlib, bzip2, lzma

Definition at line 150 of file CompStream.cxx.


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