logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

zipios::ZipOutputStream

Author

       Generated automatically by Doxygen for Zipios++ from the source code.

Zipios++                                         Tue Mar 24 2020                      zipios::ZipOutputStream(3)

Constructor & Destructor Documentation

zipios::ZipOutputStream::ZipOutputStream(std::ostream&os)[explicit]ZipOutputStream constructor.

       Parametersos 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(conststd::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.

Detailed Description

ZipOutputStream is an ostream that writes the output to a zip file. The interface approximates the
       interface of the Java ZipOutputStream.

       Definition at line 18 of file zipoutputstream.h.

Member Function Documentation

voidzipios::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.

       Definition at line 38 of file zipoutputstream.cpp.

   voidzipios::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.

       Definition at line 33 of file zipoutputstream.cpp.

   voidzipios::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.

       Definition at line 45 of file zipoutputstream.cpp.

   voidzipios::ZipOutputStream::putNextEntry(conststd::string&entryName)
       Begins writing the next entry.

       Definition at line 54 of file zipoutputstream.cpp.

   voidzipios::ZipOutputStream::putNextEntry(constZipCDirEntry&entry)
       Begins writing the next entry.

       Definition at line 50 of file zipoutputstream.cpp.

   voidzipios::ZipOutputStream::setComment(conststd::string&comment)
       Sets the global comment for the Zip archive.

       Definition at line 59 of file zipoutputstream.cpp.

   voidzipios::ZipOutputStream::setLevel(intlevel)
       Sets the compression level to be used for subsequent entries.

       Definition at line 64 of file zipoutputstream.cpp.

   voidzipios::ZipOutputStream::setMethod(StorageMethodmethod)
       Sets the compression method to be used. only STORED and DEFLATED are supported.

       Definition at line 69 of file zipoutputstream.cpp.

Name

       zipios::ZipOutputStream

Synopsis

       #include <zipoutputstream.h>

       Inherits ostream.

   PublicMemberFunctionsZipOutputStream (std::ostream &os)
           ZipOutputStream constructor.
       ZipOutputStream (const std::string &filename)
           ZipOutputStream constructor.
       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.
       void close ()
           Calls finish and if the ZipOutputStream was created with a filename as a parameter that file is
           closed as well.
       void finish ()
           Closes the current entry (if one is open), then writes the Zip Central Directory Structure closing
           the ZipOutputStream.
       void putNextEntry (const ZipCDirEntry &entry)
       void putNextEntry (const std::string &entryName)
       void setComment (const std::string &comment)
           Sets the global comment for the Zip archive.
       void setLevel (int level)
           Sets the compression level to be used for subsequent entries.
       void setMethod (StorageMethod method)
           Sets the compression method to be used.
       virtual ~ZipOutputStream ()
           Destructor.

See Also