.TH "zipios::DeflateOutputStreambuf" 3 "Tue May 9 2017" "Zipios++" \" -*- nroff -*- .ad l .nh .SH NAME zipios::DeflateOutputStreambuf \- \fBDeflateOutputStreambuf\fP is an output stream filter, that deflates the data that is written to it before it passes it on to the output stream it is attached to\&. .SH SYNOPSIS .br .PP .PP \fC#include \fP .PP Inherits \fBzipios::FilterOutputStreambuf\fP\&. .PP Inherited by \fBzipios::GZIPOutputStreambuf\fP, and \fBzipios::ZipOutputStreambuf\fP\&. .SS "Public Member Functions" .in +1c .ti -1c .RI "\fBDeflateOutputStreambuf\fP (streambuf *outbuf, bool user_init=false, bool del_outbuf=false)" .br .RI "\fBDeflateOutputStreambuf\fP constructor\&. " .ti -1c .RI "virtual \fB~DeflateOutputStreambuf\fP ()" .br .RI "Destructor\&. " .ti -1c .RI "bool \fBinit\fP (int comp_level=6)" .br .ti -1c .RI "bool \fBcloseStream\fP ()" .br .ti -1c .RI "uint32 \fBgetCrc32\fP () const" .br .RI "Returns the CRC32 for the current stream\&. " .ti -1c .RI "uint32 \fBgetCount\fP () const" .br .RI "Returns the number of bytes written to the streambuf, that has been processed from the input buffer by the compressor\&. " .in -1c .SS "Protected Member Functions" .in +1c .ti -1c .RI "virtual int \fBoverflow\fP (int c=EOF)" .br .ti -1c .RI "virtual int \fBsync\fP ()" .br .ti -1c .RI "bool \fBflushOutvec\fP ()" .br .RI "Flushes _outvec and updates _zs\&.next_out and _zs\&.avail_out\&. " .ti -1c .RI "void \fBendDeflation\fP ()" .br .RI "Flushes the remaining data in the zlib buffers, after which the only possible operations are deflateEnd() or deflateReset()\&. " .in -1c .SS "Protected Attributes" .in +1c .ti -1c .RI "const int \fB_invecsize\fP" .br .ti -1c .RI "vector< char > \fB_invec\fP" .br .ti -1c .RI "const int \fB_outvecsize\fP" .br .ti -1c .RI "vector< char > \fB_outvec\fP" .br .ti -1c .RI "uint32 \fB_crc32\fP" .br .ti -1c .RI "uint32 \fB_overflown_bytes\fP" .br .in -1c .SH "Detailed Description" .PP \fBDeflateOutputStreambuf\fP is an output stream filter, that deflates the data that is written to it before it passes it on to the output stream it is attached to\&. Deflation/Inflation is a compression/decompression method used in gzip and zip\&. The zlib library is used to perform the actual deflation, this class only wraps the functionality in an output stream filter\&. .PP Definition at line 25 of file deflateoutputstreambuf\&.h\&. .SH "Constructor & Destructor Documentation" .PP .SS "zipios::DeflateOutputStreambuf::DeflateOutputStreambuf (streambuf * outbuf, bool user_init = \fCfalse\fP, bool del_outbuf = \fCfalse\fP)\fC [explicit]\fP" .PP \fBDeflateOutputStreambuf\fP constructor\&. .PP \fBParameters:\fP .RS 4 \fIoutbuf\fP the streambuf to use for output\&. .br \fIuser_init\fP If false user must invoke init() before writing any data\&. (\fBZipOutputStreambuf\fP needs to do this) .br \fIdel_outbuf\fP if true is specified outbuf will be deleted, when the \fBDeflateOutputStreambuf\fP is destructed\&. .RE .PP .PP Definition at line 18 of file deflateoutputstreambuf\&.cpp\&. .SS "zipios::DeflateOutputStreambuf::~DeflateOutputStreambuf ()\fC [virtual]\fP" .PP Destructor\&. .PP Definition at line 43 of file deflateoutputstreambuf\&.cpp\&. .SH "Member Function Documentation" .PP .SS "void zipios::DeflateOutputStreambuf::endDeflation ()\fC [protected]\fP" .PP Flushes the remaining data in the zlib buffers, after which the only possible operations are deflateEnd() or deflateReset()\&. .PP Definition at line 173 of file deflateoutputstreambuf\&.cpp\&. .SS "bool zipios::DeflateOutputStreambuf::flushOutvec ()\fC [protected]\fP" .PP Flushes _outvec and updates _zs\&.next_out and _zs\&.avail_out\&. .PP Definition at line 162 of file deflateoutputstreambuf\&.cpp\&. .SS "uint32 zipios::DeflateOutputStreambuf::getCount () const\fC [inline]\fP" .PP Returns the number of bytes written to the streambuf, that has been processed from the input buffer by the compressor\&. After closeStream() has been called this number is the total number of bytes written to the stream\&. .PP Definition at line 55 of file deflateoutputstreambuf\&.h\&. .SS "uint32 zipios::DeflateOutputStreambuf::getCrc32 () const\fC [inline]\fP" .PP Returns the CRC32 for the current stream\&. The returned value is the CRC for the data that has been compressed already (due to a call to overflow())\&. As \fBDeflateOutputStreambuf\fP may buffer an arbitrary amount of bytes until closeStream() has been invoked, the returned value is not very useful before closeStream() has been called\&. .PP Definition at line 49 of file deflateoutputstreambuf\&.h\&. .SH "Author" .PP Generated automatically by Doxygen for Zipios++ from the source code\&.