Zipios++
zipios++
gzipoutputstreambuf.h
Go to the documentation of this file.
1
#ifndef GZIPOUTPUTSTREAMBUF_H
2
#define GZIPOUTPUTSTREAMBUF_H
3
4
#include "zipios++/zipios-config.h"
5
6
#include <vector>
7
8
#include <zlib.h>
9
10
#include "
zipios++/deflateoutputstreambuf.h
"
11
12
namespace
zipios {
13
15
class
GZIPOutputStreambuf
:
public
DeflateOutputStreambuf
{
16
public
:
17
23
explicit
GZIPOutputStreambuf
( streambuf *outbuf,
bool
del_outbuf =
false
) ;
24
25
void
setFilename(
const
string
&filename );
26
void
setComment(
const
string
&comment );
27
29
void
close
() ;
30
32
void
finish
() ;
33
35
virtual
~GZIPOutputStreambuf
() ;
36
37
protected
:
38
virtual
int
overflow(
int
c = EOF ) ;
39
virtual
int
sync() ;
40
41
private
:
42
void
writeHeader();
43
void
writeTrailer();
44
void
writeInt(uint32 i);
45
46
std::string _filename;
47
std::string _comment;
48
bool
_open ;
49
};
50
51
52
}
// namespace
53
54
55
56
#endif
57
62
/*
63
Zipios++ - a small C++ library that provides easy access to .zip files.
64
Copyright (C) 2000 Thomas Søndergaard
65
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.
70
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.
75
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
79
*/
deflateoutputstreambuf.h
zipios::GZIPOutputStreambuf::close
void close()
Calls finish.
Definition:
gzipoutputstreambuf.cpp:33
zipios::GZIPOutputStreambuf::~GZIPOutputStreambuf
virtual ~GZIPOutputStreambuf()
Destructor.
Definition:
gzipoutputstreambuf.cpp:47
zipios::GZIPOutputStreambuf
GZIPOutputStreambuf is a zip output streambuf filter.
Definition:
gzipoutputstreambuf.h:15
zipios::GZIPOutputStreambuf::GZIPOutputStreambuf
GZIPOutputStreambuf(streambuf *outbuf, bool del_outbuf=false)
GZIPOutputStreambuf constructor.
Definition:
gzipoutputstreambuf.cpp:19
zipios::DeflateOutputStreambuf
DeflateOutputStreambuf is an output stream filter, that deflates the data that is written to it befor...
Definition:
deflateoutputstreambuf.h:25
zipios::GZIPOutputStreambuf::finish
void finish()
Finishes the compression.
Definition:
gzipoutputstreambuf.cpp:37
Generated by
1.8.18