6 #ifndef FILEIO_GENERAL_FSTREAM_SOURCE_HPP 7 #define FILEIO_GENERAL_FSTREAM_SOURCE_HPP 10 #include <boost/iostreams/stream.hpp> 11 #include <core/storage/fileio/union_fstream.hpp> 12 #include <core/storage/fileio/fileio_constants.hpp> 13 #include <boost/iostreams/filter/gzip.hpp> 15 namespace fileio_impl {
28 std::shared_ptr<union_fstream> in_file;
30 std::shared_ptr<boost::iostreams::gzip_decompressor> decompressor;
33 std::shared_ptr<std::istream> underlying_stream;
36 bool is_gzip_compressed =
false;
38 typedef char char_type;
39 struct category:
public boost::iostreams::device_tag,
40 boost::iostreams::closable_tag,
41 boost::iostreams::multichar_tag,
42 boost::iostreams::input_seekable,
43 boost::iostreams::optimally_buffered_tag {};
80 inline std::streamsize optimal_buffer_size()
const {
93 std::streamsize
read(
char* c, std::streamsize bufsize);
118 std::streampos
seek(std::streamoff off, std::ios_base::seekdir way);
130 void open_file(std::string file,
bool gzip_compressed);
general_fstream_source(std::string file)
std::streamsize read(char *c, std::streamsize bufsize)
std::streampos seek(std::streamoff off, std::ios_base::seekdir way)
size_t get_bytes_read() const
std::shared_ptr< std::istream > get_underlying_stream() const
~general_fstream_source()
size_t FILEIO_READER_BUFFER_SIZE