zipios::De...tStreambuf(3)
π zipios::De...tStreambuf(3) π
okay bestie, gather round, because this one is from the Library Functions Manual for Zipios++ and it's honestly such a serve. it's zipios::DeflateOutputStreambuf and she's giving compressor-filter realness. let's get into it β¨
πΈ NAME πΈ
zipios::DeflateOutputStreambuf β DeflateOutputStreambuf 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.
like. she squeezes ur data before handing it off. iconique.
π SYNOPSIS π
#include <deflateoutputstreambuf.h>
Inherits zipios::FilterOutputStreambuf.
Inherited by zipios::GZIPOutputStreambuf, and zipios::ZipOutputStreambuf.
so yes she's part of a whole family tree, we love a nepo baby with actual talent π
β¨ Public Member Functions β¨
DeflateOutputStreambuf (streambuf *outbuf, bool user_init=false, bool del_outbuf=false)β DeflateOutputStreambuf constructor. yes queen, set it up.virtual ~DeflateOutputStreambuf ()β Destructor. the goodbye era πbool init (int comp_level=6)β no description given in the source, she just exists and does her thingbool closeStream ()β also no description in the source, just vibesuint32 getCrc32 () constβ Returns the CRC32 for the current stream.uint32 getCount () constβ Returns the number of bytes written to the streambuf, that has been processed from the input buffer by the compressor.
π¦ Protected Member Functions π¦
virtual int overflow (int c=EOF)β no description in the source, she's mysteriousvirtual int sync ()β same, mysteriousbool flushOutvec ()β Flushes_outvecand updates_zs.next_outand_zs.avail_out.void endDeflation ()β Flushes the remaining data in the zlib buffers, after which the only possible operations aredeflateEnd()ordeflateReset().
π Protected Attributes π
const int _invecsizevector< char > _invecconst int _outvecsizevector< char > _outvecuint32 _crc32uint32 _overflown_bytes
the internals. we don't touch, we just respect π«Ά
π Detailed Description π
DeflateOutputStreambuf 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.
fr fr she is NOT doing the compressing herself. zlib does the heavy lifting, she's just the cute lil wrapper around it. no cap.
Definition at line 25 of file deflateoutputstreambuf.h.
π Constructor & Destructor Documentation π
π zipios::DeflateOutputStreambuf::DeflateOutputStreambuf (streambuf * outbuf, bool user_init = false, bool del_outbuf = false) [explicit]
DeflateOutputStreambuf constructor.
Parameters
outbufβ the streambuf to use for output.user_initβ If false user must invokeinit()before writing any data. (ZipOutputStreambufneeds to do this)del_outbufβ if true is specifiedoutbufwill be deleted, when theDeflateOutputStreambufis destructed.
Definition at line 18 of file deflateoutputstreambuf.cpp.
π₯ zipios::DeflateOutputStreambuf::~DeflateOutputStreambuf () [virtual]
Destructor.
Definition at line 43 of file deflateoutputstreambuf.cpp.
β Member Function Documentation β
π« void zipios::DeflateOutputStreambuf::endDeflation () [protected]
Flushes the remaining data in the zlib buffers, after which the only possible operations are deflateEnd() or deflateReset().
like okay so after this point the ONLY things u can do are those two. that's it. that's the whole menu. periodt.
Definition at line 173 of file deflateoutputstreambuf.cpp.
π§ bool zipios::DeflateOutputStreambuf::flushOutvec () [protected]
Flushes _outvec and updates _zs.next_out and _zs.avail_out.
Definition at line 162 of file deflateoutputstreambuf.cpp.
πΈ uint32 zipios::DeflateOutputStreambuf::getCount () const [inline]
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.
so basically: before closeStream()? it's giving partial. after? it's giving the FULL total. iykyk.
Definition at line 55 of file deflateoutputstreambuf.h.
π uint32 zipios::DeflateOutputStreambuf::getCrc32 () const [inline]
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 DeflateOutputStreambuf may buffer an arbitrary amount of bytes until closeStream() has been invoked, the returned value is not very useful before closeStream() has been called.
lowkey important bestie: this value is not very useful before closeStream() has been called, because she might be sitting on an arbitrary amount of buffered bytes. don't come for her, she warned u π
Definition at line 49 of file deflateoutputstreambuf.h.
π Author π
Generated automatically by Doxygen for Zipios++ from the source code.
and that's the whole page bestie!! no notes, ate and left no crumbs π
β¨ this lil beauty comes to u from Zipios++, dated Tue Mar 24 2020, manual page zipios::De...tStreambuf(3). go forth and deflate responsibly π¦π
π¦ where this page comes from
- ubuntu jammy: libzipios++-dev 0.1.5.9+cvs.2007.04.28-11build1 Β· LGPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms