dpp::zlibcontext
zlibcontext.h
z_stream * z_stream* dpp::zlibcontext::d_stream d_stream dpp::zlibcontext::d_stream {}

Zlib stream struct. The actual type is defined in zlib.h so is only defined in the implementation file.

std::vector< unsigned char > std::vector<unsigned char> dpp::zlibcontext::decomp_buffer decomp_buffer dpp::zlibcontext::decomp_buffer {}

ZLib decompression buffer. This is automatically set to DECOMP_BUFFER_SIZE bytes when the class is constructed.

uint64_t uint64_t dpp::zlibcontext::decompressed_total decompressed_total dpp::zlibcontext::decompressed_total {}

Total decompressed received bytes counter.

dpp::zlibcontext::zlibcontext
()
zlibcontext
dpp::zlibcontext::zlibcontext

Initialise zlib struct via inflateInit() and size the buffer.

dpp::zlibcontext::~zlibcontext
()
~zlibcontext
dpp::zlibcontext::~zlibcontext

Destroy zlib struct via inflateEnd().

exception_error_code exception_error_code dpp::zlibcontext::decompress (const std::string &buffer, std::string &decompressed) decompress dpp::zlibcontext::decompress const std::string & buffer std::string & decompressed

Decompress zlib deflated buffer.

buffer

input compressed stream

decompressed

output decompressed content

an error code on error, or err_no_code_specified (0) on success

This is an opaque class containing zlib library specific structures. This wraps the C pointers needed for zlib with unique_ptr and gives us a nice buffer abstraction so we don't need to wrestle with raw pointers.

T
char
dpp::zlibcontext
d_stream
decomp_buffer
decompressed_total
std::vector< T >
elements
std::vector< unsigned char >
elements
< unsigned char >
uint64_t
z_stream *
- dpp::zlibcontext
  d_stream
- dpp::zlibcontext
  decomp_buffer
- dpp::zlibcontext
  decompress
- dpp::zlibcontext
  decompressed_total
- dpp::zlibcontext
  zlibcontext
- dpp::zlibcontext
  ~zlibcontext