zipios::De...tStreambuf(3)

πŸ“¦
version 0.1.5.9+cvs.2007.04.28 Β· 2 versions
, in ubuntu jammy

πŸ’– 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 thing
  • bool closeStream () β€” also no description in the source, just vibes
  • uint32 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 mysterious
  • virtual int sync () β€” same, mysterious
  • bool flushOutvec () β€” Flushes _outvec and updates _zs.next_out and _zs.avail_out.
  • void endDeflation () β€” Flushes the remaining data in the zlib buffers, after which the only possible operations are deflateEnd() or deflateReset().

πŸ‘‘ Protected Attributes πŸ‘‘

  • const int _invecsize
  • vector< char > _invec
  • const int _outvecsize
  • vector< char > _outvec
  • uint32 _crc32
  • uint32 _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 invoke init() before writing any data. (ZipOutputStreambuf needs to do this)
  • del_outbuf β€” if true is specified outbuf will be deleted, when the DeflateOutputStreambuf is 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