1 #ifndef GZIPOUTPUTSTREAM_H
2 #define GZIPOUTPUTSTREAM_H
4 #include "zipios++/zipios-config.h"
6 #include "zipios++/meta-iostreams.h"
10 #include "zipios++/gzipoutputstreambuf.h"
14 /** \anchor GZIPOutputStream_anchor
15 GZIPOutputStream is an ostream that writes the output to a gz file. The
16 interface approximates the interface of the Java GZIPOutputStream. */
17 class GZIPOutputStream : public std::ostream {
20 /** GZIPOutputStream constructor.
21 @param os ostream to which the compressed zip archive is written.
23 explicit GZIPOutputStream( std::ostream &os ) ;
25 /** GZIPOutputStream constructor.
26 @filename filename to write the gzip archive to. */
27 explicit GZIPOutputStream( const std::string &filename ) ;
29 void setFilename( const string &filename );
30 void setComment( const string &comment );
32 /** Calls finish and closes the stream. */
35 /** Finishes the stream. */
39 virtual ~GZIPOutputStream() ;
43 GZIPOutputStreambuf *ozf ;
51 Header file that defines GZIPOutputStream.
55 Zipios++ - a small C++ library that provides easy access to .zip files.
56 Copyright (C) 2000 Thomas Søndergaard
58 This library is free software; you can redistribute it and/or
59 modify it under the terms of the GNU Lesser General Public
60 License as published by the Free Software Foundation; either
61 version 2 of the License, or (at your option) any later version.
63 This library is distributed in the hope that it will be useful,
64 but WITHOUT ANY WARRANTY; without even the implied warranty of
65 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
66 Lesser General Public License for more details.
68 You should have received a copy of the GNU Lesser General Public
69 License along with this library; if not, write to the Free Software
70 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA