zipios::Zi...tStreambuf(3)

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

✨ NAME ✨

zipios::ZipOutputStreambuf β€” okay so bestie, this is a zip output streambuf filter. That's the whole vibe. πŸ’–


🌸 SYNOPSIS 🌸

#include <zipoutputstreambuf.h>

Inherits zipios::DeflateOutputStreambuf. She's got a whole family tree, iykyk. πŸ‘‘

πŸŽ€ Public Types

  • enum CompressionLevels β€” the mood ring of compression, fr:
    • NO_COMPRESSION = Z_NO_COMPRESSION
    • BEST_SPEED = Z_BEST_SPEED
    • BEST_COMPRESSION = Z_BEST_COMPRESSION
    • DEFAULT_COMPRESSION = Z_DEFAULT_COMPRESSION

πŸ¦‹ Public Member Functions

  • ZipOutputStreambuf(streambuf *outbuf, bool del_outbuf=false) β€” the ZipOutputStreambuf constructor.
  • void closeEntry() β€” closes the current entry and moves the stream read pointer to the beginning of the next entry (if there even is one).
  • void close() β€” calls finish.
  • void finish() β€” closes the current entry (if one's open), then writes the Zip Central Directory Structure, which closes the ZipOutputStream.
  • void putNextEntry(const ZipCDirEntry &entry) β€” starts writing the next entry.
  • void setComment(const string &comment) β€” sets the global comment for the Zip archive.
  • void setLevel(int level) β€” sets the compression level used for all the entries that come after.
  • void setMethod(StorageMethod method) β€” sets the compression method to use.
  • virtual ~ZipOutputStreambuf() β€” destructor, bye bestie.

πŸ’… Protected Member Functions

  • virtual int overflow(int c=EOF)
  • virtual int sync()
  • void setEntryClosedState()
  • void updateEntryHeaderInfo()

⭐ Static Protected Member Functions

  • static void writeCentralDirectory(const vector< ZipCDirEntry > &entries, EndOfCentralDirectory eocd, ostream &os)

🌈 Additional Inherited Members

(yeah she inherited some stuff too, no cap)


πŸ’œ DETAILED DESCRIPTION

ZipOutputStreambuf is a zip output streambuf filter. That's it, that's the description. Short king energy.

Definition at line 17 of file zipoutputstreambuf.h.


πŸŽ€ CONSTRUCTOR & DESTRUCTOR DOCUMENTATION πŸŽ€

zipios::ZipOutputStreambuf::ZipOutputStreambuf(streambuf *outbuf, bool del_outbuf = false) [explicit]

The ZipOutputStreambuf constructor. Heads up bestie: a freshly constructed ZipOutputStreambuf is not ready to accept data β€” you gotta call putNextEntry() first or she's just standing there looking pretty. πŸ’€

Parameters

  • outbuf β€” the streambuf to use for input.
  • del_outbuf β€” if true is specified, outbuf will be deleted when the ZipOutputStreambuf is destructed. So like, she takes it out with her. 🫢

Definition at line 20 of file zipoutputstreambuf.cpp.

zipios::ZipOutputStreambuf::~ZipOutputStreambuf() [virtual]

Destructor. That's the whole thing. The end. Periodt. πŸ¦‹

Definition at line 56 of file zipoutputstreambuf.cpp.


✨ MEMBER FUNCTION DOCUMENTATION ✨

void zipios::ZipOutputStreambuf::close()

Calls finish. Iconic delegation, honestly. πŸ’…

Definition at line 41 of file zipoutputstreambuf.cpp.

void zipios::ZipOutputStreambuf::closeEntry()

Closes the current entry, and positions the stream read pointer at the beginning of the next entry (if there is one). Like closing a tab but make it zip. πŸŽ€

Definition at line 30 of file zipoutputstreambuf.cpp.

void zipios::ZipOutputStreambuf::finish()

Closes the current entry (if one is open), then writes the Zip Central Directory Structure, closing the ZipOutputStream. Important lil note bestie: the output stream that the zip archive is being written to is not closed. She's done with her part but she's not gonna slam the door on your stream, that's not her business. πŸ™ˆ

Definition at line 46 of file zipoutputstreambuf.cpp.

void zipios::ZipOutputStreambuf::putNextEntry(const ZipCDirEntry & entry)

Begins writing the next entry. Opens the next entry in the zip archive and returns a const pointer to a FileEntry object for the entry.

Returns

  • a const FileEntry * containing information about the (now) current entry. Main character info, fr fr. πŸ‘‘

Definition at line 61 of file zipoutputstreambuf.cpp.

void zipios::ZipOutputStreambuf::setComment(const string & comment)

Sets the global comment for the Zip archive. Say something cute. πŸ’–

Definition at line 83 of file zipoutputstreambuf.cpp.

void zipios::ZipOutputStreambuf::setLevel(int level)

Sets the compression level to be used for subsequent entries. All the entries after this one are getting the new setting, no take-backs. πŸ”₯

Definition at line 88 of file zipoutputstreambuf.cpp.

void zipios::ZipOutputStreambuf::setMethod(StorageMethod method)

Sets the compression method to be used. Only STORED and DEFLATED are supported β€” so don't come in here asking for anything else, she will not be doing that. πŸ’€

Definition at line 93 of file zipoutputstreambuf.cpp.


🌸 AUTHOR 🌸

Generated automatically by Doxygen for Zipios++ from the source code. Not a human, just a very thorough robot. Respect. πŸ€–βœ¨


And that's a wrap bestie! This lil slice of documentation came courtesy of Zipios++, dated Tue Mar 24 2020, and the page is filed under the manual name zipios::Zi...tStreambuf(3). Go forth and zip things, you've got this. πŸ’–πŸŽ€πŸ¦‹βœ¨
πŸ“¦ where this page comes from