1 #ifndef GZIPOUTPUTSTREAMBUF_H
2 #define GZIPOUTPUTSTREAMBUF_H
4 #include "zipios++/zipios-config.h"
10 #include "zipios++/deflateoutputstreambuf.h"
14 /** GZIPOutputStreambuf is a zip output streambuf filter. */
15 class GZIPOutputStreambuf : public DeflateOutputStreambuf {
18 /** GZIPOutputStreambuf constructor. A newly constructed GZIPOutputStreambuf
19 is ready to accept data.
20 @param outbuf the streambuf to use for output.
21 @param del_outbuf if true is specified outbuf will be deleted, when
22 the GZIPOutputStreambuf is destructed. */
23 explicit GZIPOutputStreambuf( streambuf *outbuf, bool del_outbuf = false ) ;
25 void setFilename( const string &filename );
26 void setComment( const string &comment );
31 /** Finishes the compression. */
35 virtual ~GZIPOutputStreambuf() ;
38 virtual int overflow( int c = EOF ) ;
44 void writeInt(uint32 i);
46 std::string _filename;
59 Header file that defines ZipOutputStreambuf.
63 Zipios++ - a small C++ library that provides easy access to .zip files.
64 Copyright (C) 2000 Thomas Søndergaard
66 This library is free software; you can redistribute it and/or
67 modify it under the terms of the GNU Lesser General Public
68 License as published by the Free Software Foundation; either
69 version 2 of the License, or (at your option) any later version.
71 This library is distributed in the hope that it will be useful,
72 but WITHOUT ANY WARRANTY; without even the implied warranty of
73 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
74 Lesser General Public License for more details.
76 You should have received a copy of the GNU Lesser General Public
77 License along with this library; if not, write to the Free Software
78 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA