25#ifndef JOIN_DATA_ZSTREAM_HPP
26#define JOIN_DATA_ZSTREAM_HPP
52 Zstreambuf (std::streambuf* streambuf,
int format,
bool own =
false);
97 virtual int_type
overflow (int_type c = traits_type::eof ())
override;
103 virtual int_type
sync ()
override;
stream buffer decorator.
Definition streambuf.hpp:38
zlib stream.
Definition zstream.hpp:125
Format
data format.
Definition zstream.hpp:131
@ Zlib
Definition zstream.hpp:133
@ Deflate
Definition zstream.hpp:132
@ Gzip
Definition zstream.hpp:134
Zstream(const Zstream &other)=delete
copy constructor.
Zstream(std::iostream &stream, Format format=Zlib)
create the zlib stream instance.
Definition zstream.cpp:203
virtual ~Zstream()=default
destroy the zlib stream instance.
Zstream & operator=(const Zstream &other)=delete
copy assignment operator.
Zstreambuf _zbuf
zlib stream buffer
Definition zstream.hpp:177
zlib stream buffer.
Definition zstream.hpp:44
Zstreambuf & operator=(const Zstreambuf &other)=delete
copy assignment operator.
virtual int_type underflow() override
reads characters from the associated input sequence to the get area.
Definition zstream.cpp:98
Zstreambuf(std::streambuf *streambuf, int format, bool own=false)
create the zlib stream buffer instance.
Definition zstream.cpp:39
std::unique_ptr< char[]> _buf
internal buffer.
Definition zstream.hpp:118
virtual int_type overflow(int_type c=traits_type::eof()) override
writes characters to the associated output sequence from the put area.
Definition zstream.cpp:142
int _instate
inflate state.
Definition zstream.hpp:112
std::unique_ptr< z_stream > _inflate
inflate context.
Definition zstream.hpp:109
static const std::streamsize _bufsize
internal buffer size.
Definition zstream.hpp:106
Zstreambuf(const Zstreambuf &other)=delete
copy constructor.
virtual ~Zstreambuf()
destroy the zlib stream buffer instance.
Definition zstream.cpp:78
virtual int_type sync() override
synchronizes the buffers with the associated character sequence.
Definition zstream.cpp:189
std::unique_ptr< z_stream > _deflate
deflate context.
Definition zstream.hpp:115
Definition acceptor.hpp:32