ゴミ箱
inflate_stream.hpp
Go to the documentation of this file.
1 //
2 // Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com)
3 //
4 // Distributed under the Boost Software License, Version 1.0. (See accompanying
5 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6 //
7 // Official repository: https://github.com/boostorg/beast
8 //
9 
10 #ifndef BOOST_BEAST_ZLIB_INFLATE_STREAM_HPP
11 #define BOOST_BEAST_ZLIB_INFLATE_STREAM_HPP
12 
13 #include <boost/beast/config.hpp>
15 
16 // This is a derivative work based on Zlib, copyright below:
17 /*
18  Copyright (C) 1995-2013 Jean-loup Gailly and Mark Adler
19 
20  This software is provided 'as-is', without any express or implied
21  warranty. In no event will the authors be held liable for any damages
22  arising from the use of this software.
23 
24  Permission is granted to anyone to use this software for any purpose,
25  including commercial applications, and to alter it and redistribute it
26  freely, subject to the following restrictions:
27 
28  1. The origin of this software must not be misrepresented; you must not
29  claim that you wrote the original software. If you use this software
30  in a product, an acknowledgment in the product documentation would be
31  appreciated but is not required.
32  2. Altered source versions must be plainly marked as such, and must not be
33  misrepresented as being the original software.
34  3. This notice may not be removed or altered from any source distribution.
35 
36  Jean-loup Gailly Mark Adler
37  jloup@gzip.org madler@alumni.caltech.edu
38 
39  The data format used by the zlib library is described by RFCs (Request for
40  Comments) 1950 to 1952 in the files http://tools.ietf.org/html/rfc1950
41  (zlib format), rfc1951 (deflate format) and rfc1952 (gzip format).
42 */
43 
44 namespace boost {
45 namespace beast {
46 namespace zlib {
47 
65  : private detail::inflate_stream
66 {
67 public:
72  inflate_stream() = default;
73 
80  void
82  {
83  doReset();
84  }
85 
92  void
93  reset(int windowBits)
94  {
95  doReset(windowBits);
96  }
97 
102  void
104  {
105  doClear();
106  }
107 
209  void
210  write(z_params& zs, Flush flush, error_code& ec)
211  {
212  doWrite(zs, flush, ec);
213  }
214 };
215 
216 } // zlib
217 } // beast
218 } // boost
219 
220 #endif
Definition: inflate_stream.hpp:64
void doClear()
Definition: inflate_stream.hpp:257
Definition: async_result.hpp:20
Definition: zlib.hpp:79
void reset()
Definition: inflate_stream.hpp:81
void reset(int windowBits)
Definition: inflate_stream.hpp:93
Flush
Definition: zlib.hpp:114
void doReset()
Definition: inflate_stream.hpp:71
boost::system::error_code error_code
The type of error code used by the library.
Definition: error.hpp:21
void write(z_params &zs, Flush flush, error_code &ec)
Definition: inflate_stream.hpp:210
Definition: inflate_stream.hpp:58
void doWrite(z_params &zs, Flush flush, error_code &ec)
Definition: inflate_stream.hpp:264
void clear()
Definition: inflate_stream.hpp:103