zipios
2.2.0
Zipios -- a small C++ library that provides easy access to .zip files.
src
inflateinputstreambuf.hpp
Go to the documentation of this file.
1
#pragma once
2
#ifndef INFLATEINPUTSTREAMBUF_HPP
3
#define INFLATEINPUTSTREAMBUF_HPP
4
5
/*
6
Zipios -- a small C++ library that provides easy access to .zip files.
7
8
Copyright (C) 2000-2007 Thomas Sondergaard
9
Copyright (C) 2015-2019 Made to Order Software Corporation
10
11
This library is free software; you can redistribute it and/or
12
modify it under the terms of the GNU Lesser General Public
13
License as published by the Free Software Foundation; either
14
version 2.1 of the License, or (at your option) any later version.
15
16
This library is distributed in the hope that it will be useful,
17
but WITHOUT ANY WARRANTY; without even the implied warranty of
18
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19
Lesser General Public License for more details.
20
21
You should have received a copy of the GNU Lesser General Public
22
License along with this library; if not, write to the Free Software
23
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
24
*/
25
34
#include "
filterinputstreambuf.hpp
"
35
36
#include "
zipios/zipios-config.hpp
"
37
38
#include <vector>
39
40
#include <zlib.h>
41
42
43
namespace
zipios
44
{
45
46
47
class
InflateInputStreambuf
:
public
FilterInputStreambuf
48
{
49
public
:
50
InflateInputStreambuf
(std::streambuf *inbuf,
offset_t
s_pos = -1);
51
InflateInputStreambuf
(
InflateInputStreambuf
const
& src) =
delete
;
52
InflateInputStreambuf
&
operator =
(
InflateInputStreambuf
const
& src) =
delete
;
53
virtual
~InflateInputStreambuf
();
54
55
bool
reset
(
offset_t
stream_position = -1);
56
57
protected
:
58
virtual
std::streambuf::int_type
underflow
()
override
;
59
62
std::vector<char>
m_outvec
;
63
64
private
:
65
std::vector<char>
m_invec
;
66
67
z_stream
m_zs
;
68
bool
m_zs_initialized
=
false
;
69
};
70
71
72
}
// namespace
73
74
// Local Variables:
75
// mode: cpp
76
// indent-tabs-mode: nil
77
// c-basic-offset: 4
78
// tab-width: 4
79
// End:
80
81
// vim: ts=4 sw=4 et
82
#endif
zipios::FilterInputStreambuf
A base class to develop input stream filters.
Definition
filterinputstreambuf.hpp:38
zipios::InflateInputStreambuf
A stream buffer to inflate data previous compressed with zlib.
Definition
inflateinputstreambuf.hpp:48
zipios::InflateInputStreambuf::m_invec
std::vector< char > m_invec
Definition
inflateinputstreambuf.hpp:65
zipios::InflateInputStreambuf::m_zs
z_stream m_zs
Definition
inflateinputstreambuf.hpp:67
zipios::InflateInputStreambuf::~InflateInputStreambuf
virtual ~InflateInputStreambuf()
Clean up the InflateInputStreambuf object.
Definition
inflateinputstreambuf.cpp:99
zipios::InflateInputStreambuf::underflow
virtual std::streambuf::int_type underflow() override
Called when more data is required.
Definition
inflateinputstreambuf.cpp:130
zipios::InflateInputStreambuf::m_outvec
std::vector< char > m_outvec
Definition
inflateinputstreambuf.hpp:62
zipios::InflateInputStreambuf::operator=
InflateInputStreambuf & operator=(InflateInputStreambuf const &src)=delete
zipios::InflateInputStreambuf::InflateInputStreambuf
InflateInputStreambuf(std::streambuf *inbuf, offset_t s_pos=-1)
Initialize a InflateInputStreambuf.
Definition
inflateinputstreambuf.cpp:70
zipios::InflateInputStreambuf::InflateInputStreambuf
InflateInputStreambuf(InflateInputStreambuf const &src)=delete
zipios::InflateInputStreambuf::m_zs_initialized
bool m_zs_initialized
Definition
inflateinputstreambuf.hpp:68
zipios::InflateInputStreambuf::reset
bool reset(offset_t stream_position=-1)
Initializes the stream buffer.
Definition
inflateinputstreambuf.cpp:215
filterinputstreambuf.hpp
Header file that defines zipios::FilterInputStreambuf.
zipios
The zipios namespace includes the Zipios library definitions.
Definition
backbuffer.cpp:36
zipios::offset_t
std::streamoff offset_t
Definition
zipios-config.hpp.in:59
zipios-config.hpp
zipios configuration header.
Generated on Fri Jul 26 2024 00:00:00 for zipios by
1.12.0