.TH "zipios::ZipOutputStreambuf" 3 "Tue Mar 24 2020" "Zipios++" \" -*- nroff -*-
.ad l
.nh
.SH NAME
zipios::ZipOutputStreambuf \- \fBZipOutputStreambuf\fP is a zip output streambuf filter\&.  

.SH SYNOPSIS
.br
.PP
.PP
\fC#include <zipoutputstreambuf\&.h>\fP
.PP
Inherits \fBzipios::DeflateOutputStreambuf\fP\&.
.SS "Public Types"

.in +1c
.ti -1c
.RI "enum \fBCompressionLevels\fP { \fBNO_COMPRESSION\fP = Z_NO_COMPRESSION, \fBBEST_SPEED\fP = Z_BEST_SPEED, \fBBEST_COMPRESSION\fP = Z_BEST_COMPRESSION, \fBDEFAULT_COMPRESSION\fP = Z_DEFAULT_COMPRESSION }"
.br
.in -1c
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBZipOutputStreambuf\fP (streambuf *outbuf, bool del_outbuf=false)"
.br
.RI "\fBZipOutputStreambuf\fP constructor\&. "
.ti -1c
.RI "void \fBcloseEntry\fP ()"
.br
.RI "Closes the current entry, and positions the stream read pointer at the beginning of the next entry (if there is one)\&. "
.ti -1c
.RI "void \fBclose\fP ()"
.br
.RI "Calls finish\&. "
.ti -1c
.RI "void \fBfinish\fP ()"
.br
.RI "Closes the current entry (if one is open), then writes the Zip Central Directory Structure closing the \fBZipOutputStream\fP\&. "
.ti -1c
.RI "void \fBputNextEntry\fP (const \fBZipCDirEntry\fP &entry)"
.br
.RI "Begins writing the next entry\&. "
.ti -1c
.RI "void \fBsetComment\fP (const string &comment)"
.br
.RI "Sets the global comment for the Zip archive\&. "
.ti -1c
.RI "void \fBsetLevel\fP (int level)"
.br
.RI "Sets the compression level to be used for subsequent entries\&. "
.ti -1c
.RI "void \fBsetMethod\fP (\fBStorageMethod\fP method)"
.br
.RI "Sets the compression method to be used\&. "
.ti -1c
.RI "virtual \fB~ZipOutputStreambuf\fP ()"
.br
.RI "Destructor\&. "
.in -1c
.SS "Protected Member Functions"

.in +1c
.ti -1c
.RI "virtual int \fBoverflow\fP (int c=EOF)"
.br
.ti -1c
.RI "virtual int \fBsync\fP ()"
.br
.ti -1c
.RI "void \fBsetEntryClosedState\fP ()"
.br
.ti -1c
.RI "void \fBupdateEntryHeaderInfo\fP ()"
.br
.in -1c
.SS "Static Protected Member Functions"

.in +1c
.ti -1c
.RI "static void \fBwriteCentralDirectory\fP (const vector< \fBZipCDirEntry\fP > &entries, \fBEndOfCentralDirectory\fP eocd, ostream &os)"
.br
.in -1c
.SS "Additional Inherited Members"
.SH "Detailed Description"
.PP 
\fBZipOutputStreambuf\fP is a zip output streambuf filter\&. 


.br
 
.PP
Definition at line 17 of file zipoutputstreambuf\&.h\&.
.SH "Constructor & Destructor Documentation"
.PP 
.SS "zipios::ZipOutputStreambuf::ZipOutputStreambuf (streambuf * outbuf, bool del_outbuf = \fCfalse\fP)\fC [explicit]\fP"

.PP
\fBZipOutputStreambuf\fP constructor\&. A newly constructed \fBZipOutputStreambuf\fP is not ready to accept data, \fBputNextEntry()\fP must be invoked first\&. 
.PP
\fBParameters\fP
.RS 4
\fIoutbuf\fP the streambuf to use for input\&. 
.br
\fIdel_outbuf\fP if true is specified outbuf will be deleted, when the \fBZipOutputStreambuf\fP is destructed\&. 
.br
 
.RE
.PP

.PP
Definition at line 20 of file zipoutputstreambuf\&.cpp\&.
.SS "zipios::ZipOutputStreambuf::~ZipOutputStreambuf ()\fC [virtual]\fP"

.PP
Destructor\&. 
.PP
Definition at line 56 of file zipoutputstreambuf\&.cpp\&.
.SH "Member Function Documentation"
.PP 
.SS "void zipios::ZipOutputStreambuf::close ()"

.PP
Calls finish\&. 
.PP
Definition at line 41 of file zipoutputstreambuf\&.cpp\&.
.SS "void zipios::ZipOutputStreambuf::closeEntry ()"

.PP
Closes the current entry, and positions the stream read pointer at the beginning of the next entry (if there is one)\&. 
.PP
Definition at line 30 of file zipoutputstreambuf\&.cpp\&.
.SS "void zipios::ZipOutputStreambuf::finish ()"

.PP
Closes the current entry (if one is open), then writes the Zip Central Directory Structure closing the \fBZipOutputStream\fP\&. The output stream that the zip archive is being written to is not closed\&. 
.PP
Definition at line 46 of file zipoutputstreambuf\&.cpp\&.
.SS "void zipios::ZipOutputStreambuf::putNextEntry (const \fBZipCDirEntry\fP & entry)"

.PP
Begins writing the next entry\&. Opens the next entry in the zip archive and returns a const pointer to a \fBFileEntry\fP object for the entry\&. 
.PP
\fBReturns\fP
.RS 4
a const \fBFileEntry\fP * containing information about the (now) current entry\&. 
.RE
.PP

.PP
Definition at line 61 of file zipoutputstreambuf\&.cpp\&.
.SS "void zipios::ZipOutputStreambuf::setComment (const string & comment)"

.PP
Sets the global comment for the Zip archive\&. 
.PP
Definition at line 83 of file zipoutputstreambuf\&.cpp\&.
.SS "void zipios::ZipOutputStreambuf::setLevel (int level)"

.PP
Sets the compression level to be used for subsequent entries\&. 
.PP
Definition at line 88 of file zipoutputstreambuf\&.cpp\&.
.SS "void zipios::ZipOutputStreambuf::setMethod (\fBStorageMethod\fP method)"

.PP
Sets the compression method to be used\&. only STORED and DEFLATED are supported\&. 
.PP
Definition at line 93 of file zipoutputstreambuf\&.cpp\&.

.SH "Author"
.PP 
Generated automatically by Doxygen for Zipios++ from the source code\&.
