Zipios++
gzipoutputstream.h
Go to the documentation of this file.
1#ifndef GZIPOUTPUTSTREAM_H
2#define GZIPOUTPUTSTREAM_H
3
4#include "zipios++/zipios-config.h"
5
6#include "zipios++/meta-iostreams.h"
7
8#include <string>
9
11
12namespace zipios {
13
17class GZIPOutputStream : public std::ostream {
18public:
19
23 explicit GZIPOutputStream( std::ostream &os ) ;
24
27 explicit GZIPOutputStream( const std::string &filename ) ;
28
29 void setFilename( const string &filename );
30 void setComment( const string &comment );
31
33 void close() ;
34
36 void finish() ;
37
39 virtual ~GZIPOutputStream() ;
40
41private:
42 std::ofstream *ofs ;
44};
45
46} // namespace.
47
48#endif
49
54/*
55 Zipios++ - a small C++ library that provides easy access to .zip files.
56 Copyright (C) 2000 Thomas Søndergaard
57
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.
62
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.
67
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
71*/
GZIPOutputStream is an ostream that writes the output to a gz file.
void close()
Calls finish and closes the stream.
virtual ~GZIPOutputStream()
Destructor.
void finish()
Finishes the stream.
GZIPOutputStreambuf is a zip output streambuf filter.
Header file that defines ZipOutputStreambuf.