zipios::ZipOutputStream(3)

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

πŸ’– zipios::ZipOutputStream πŸ’–

okay bestie, welcome to the Library Functions Manual ✨ this is zipios::ZipOutputStream(3) and she is that girl β€” an ostream that literally writes zip files for you. no cap.


🌸 NAME 🌸

zipios::ZipOutputStream β€” the class that turns your stream dreams into an actual .zip πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

#include <zipoutputstream.h>

Inherits ostream. yes ma'am, she's part of the family 🫢

✨ Public Member Functions ✨

  • ZipOutputStream(std::ostream &os) β€” ZipOutputStream constructor. the classic one πŸ’–
  • ZipOutputStream(const std::string &filename) β€” ZipOutputStream constructor. the "just gimme a filename" one πŸ¦‹
  • void closeEntry() β€” Closes the current entry, updates its header with the relevant size information, and positions the stream write pointer for the next entry header. very organized of her ✨
  • void close() β€” Calls finish, and if the ZipOutputStream was created with a filename as a parameter, that file is closed as well. closing time, doors shut πŸ”₯
  • void finish() β€” Closes the current entry (if one is open), then writes the Zip Central Directory Structure, closing the ZipOutputStream. the grand finale πŸŽ€
  • void putNextEntry(const ZipCDirEntry &entry) β€” begins writing the next entry πŸ“
  • void putNextEntry(const std::string &entryName) β€” begins writing the next entry πŸ“
  • void setComment(const std::string &comment) β€” Sets the global comment for the Zip archive. leave a lil note bestie πŸ’Œ
  • void setLevel(int level) β€” Sets the compression level to be used for subsequent entries. squeeze harder or don't, your call πŸ’…
  • void setMethod(StorageMethod method) β€” Sets the compression method to be used. ⭐
  • virtual ~ZipOutputStream() β€” Destructor. she's leaving, say bye πŸ‘‹

πŸ¦‹ Detailed Description πŸ¦‹

ZipOutputStream is an ostream that writes the output to a zip file. The interface approximates the interface of the Java ZipOutputStream. it's giving "Java but make it C++" and honestly? obsessed 😭

Definition at line 18 of file zipoutputstream.h.


🌈 Constructor & Destructor Documentation 🌈

πŸ’œ zipios::ZipOutputStream::ZipOutputStream(std::ostream & os) [explicit]

ZipOutputStream constructor.

Parameters

  • os β€” ostream to which the compressed zip archive is written.
  • pos β€” position to reposition the ostream to before reading.

Definition at line 13 of file zipoutputstream.cpp.

πŸ’œ zipios::ZipOutputStream::ZipOutputStream(const std::string & filename) [explicit]

ZipOutputStream constructor. @filename filename to write the zip archive to.

Definition at line 24 of file zipoutputstream.cpp.

πŸ’œ zipios::ZipOutputStream::~ZipOutputStream() [virtual]

Destructor.

Definition at line 74 of file zipoutputstream.cpp.


🧚 Member Function Documentation 🧚

⭐ void zipios::ZipOutputStream::close()

Calls finish, and if the ZipOutputStream was created with a filename as a parameter, that file is closed as well. If the ZipOutputStream was created with an ostream as its first parameter, nothing but the call to finish happens. so like, know which constructor you used, iykyk πŸ‘‘

Definition at line 38 of file zipoutputstream.cpp.

⭐ void zipios::ZipOutputStream::closeEntry()

Closes the current entry, updates its header with the relevant size information, and positions the stream write pointer for the next entry header. Puts the stream in EOF state. Call putNextEntry() to clear the EOF stream state flag. 🚩 important flag lore, don't skip this one bestie

Definition at line 33 of file zipoutputstream.cpp.

⭐ void zipios::ZipOutputStream::finish()

Closes the current entry (if one is open), then writes the Zip Central Directory Structure, closing the ZipOutputStream. The output stream that the zip archive is being written to is not closed. 🫢 she finishes the zip but leaves your stream alone, respectful queen

Definition at line 45 of file zipoutputstream.cpp.

⭐ void zipios::ZipOutputStream::putNextEntry(const std::string & entryName)

Begins writing the next entry.

Definition at line 54 of file zipoutputstream.cpp.

⭐ void zipios::ZipOutputStream::putNextEntry(const ZipCDirEntry & entry)

Begins writing the next entry.

Definition at line 50 of file zipoutputstream.cpp.

⭐ void zipios::ZipOutputStream::setComment(const std::string & comment)

Sets the global comment for the Zip archive. πŸ’¬

Definition at line 59 of file zipoutputstream.cpp.

⭐ void zipios::ZipOutputStream::setLevel(int level)

Sets the compression level to be used for subsequent entries.

Definition at line 64 of file zipoutputstream.cpp.

⭐ void zipios::ZipOutputStream::setMethod(StorageMethod method)

Sets the compression method to be used. only STORED and DEFLATED are supported. 🚨 that's it. those two. don't come at her with anything else, fr fr

Definition at line 69 of file zipoutputstream.cpp.


πŸ‘‘ Author πŸ‘‘

Generated automatically by Doxygen for Zipios++ from the source code. so technically the author is a robot and honestly? she ate πŸ€–πŸ’…


okay that's the whole page bestie!! this was brought to you by Zipios++, dated Tue Mar 24 2020, and it's the zipios::ZipOutputStream(3) page πŸ’–βœ¨πŸŽ€ mwah, go zip something iconic πŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from