2 #include "zipios++/zipios-config.h"
4 #include "zipios++/meta-iostreams.h"
6 #include "zipios++/gzipoutputstreambuf.h"
7 #include "zipios++/gzipoutputstream.h"
13 GZIPOutputStream::GZIPOutputStream( std::ostream &os )
17 ozf = new GZIPOutputStreambuf( os.rdbuf() ) ;
22 GZIPOutputStream::GZIPOutputStream( const std::string &filename )
26 ofs = new std::ofstream( filename.c_str(), std::ios::out | std::ios::binary ) ;
27 ozf = new GZIPOutputStreambuf( ofs->rdbuf() ) ;
31 void GZIPOutputStream::setFilename( const string &filename ) {
32 ozf->setFilename(filename);
35 void GZIPOutputStream::setComment( const string &comment ) {
36 ozf->setComment(comment);
39 void GZIPOutputStream::close() {
46 void GZIPOutputStream::finish() {
51 GZIPOutputStream::~GZIPOutputStream() {
52 // It's ok to call delete with a Null pointer.
60 Implementation of GZIPOutputStream.
64 Zipios++ - a small C++ library that provides easy access to .zip files.
65 Copyright (C) 2000 Thomas Søndergaard
67 This library is free software; you can redistribute it and/or
68 modify it under the terms of the GNU Lesser General Public
69 License as published by the Free Software Foundation; either
70 version 2 of the License, or (at your option) any later version.
72 This library is distributed in the hope that it will be useful,
73 but WITHOUT ANY WARRANTY; without even the implied warranty of
74 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
75 Lesser General Public License for more details.
77 You should have received a copy of the GNU Lesser General Public
78 License along with this library; if not, write to the Free Software
79 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA