ゴミ箱
Main Page
Namespaces
Classes
Files
File List
File Members
3pp
beast
boost
beast
zlib
zlib.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_ZLIB_HPP
11
#define BOOST_BEAST_ZLIB_ZLIB_HPP
12
13
#include <
boost/beast/config.hpp
>
14
#include <cstdint>
15
#include <cstdlib>
16
17
// This is a derivative work based on Zlib, copyright below:
18
/*
19
Copyright (C) 1995-2013 Jean-loup Gailly and Mark Adler
20
21
This software is provided 'as-is', without any express or implied
22
warranty. In no event will the authors be held liable for any damages
23
arising from the use of this software.
24
25
Permission is granted to anyone to use this software for any purpose,
26
including commercial applications, and to alter it and redistribute it
27
freely, subject to the following restrictions:
28
29
1. The origin of this software must not be misrepresented; you must not
30
claim that you wrote the original software. If you use this software
31
in a product, an acknowledgment in the product documentation would be
32
appreciated but is not required.
33
2. Altered source versions must be plainly marked as such, and must not be
34
misrepresented as being the original software.
35
3. This notice may not be removed or altered from any source distribution.
36
37
Jean-loup Gailly Mark Adler
38
jloup@gzip.org madler@alumni.caltech.edu
39
40
The data format used by the zlib library is described by RFCs (Request for
41
Comments) 1950 to 1952 in the files http://tools.ietf.org/html/rfc1950
42
(zlib format), rfc1951 (deflate format) and rfc1952 (gzip format).
43
*/
44
45
namespace
boost
{
46
namespace
beast {
47
namespace
zlib {
48
49
#if !defined(__MACTYPES__)
50
typedef
unsigned
char
Byte
;
/* 8 bits */
51
#endif
52
typedef
unsigned
int
uInt
;
/* 16 bits or more */
53
54
/* Possible values of the data_type field (though see inflate()) */
55
enum
z_Type
56
{
57
Z_BINARY
= 0,
58
Z_TEXT
= 1,
59
Z_UNKNOWN
= 2
60
};
61
79
struct
z_params
80
{
85
void
const
*
next_in
;
86
91
std::size_t
avail_in
;
92
95
std::size_t
total_in
= 0;
96
99
void
*
next_out
;
100
103
std::size_t
avail_out
;
104
107
std::size_t
total_out
= 0;
108
109
int
data_type
=
Z_UNKNOWN
;
// best guess about the data type: binary or text
110
};
111
114
enum class
Flush
115
{
116
// order matters
117
118
none
,
119
block
,
120
partial
,
121
sync
,
122
full
,
123
finish
,
124
trees
125
};
126
127
/* compression levels */
128
enum
z_Compression
129
{
130
Z_NO_COMPRESSION
= 0,
131
Z_BEST_SPEED
= 1,
132
Z_BEST_COMPRESSION
= 9,
133
Z_DEFAULT_COMPRESSION
= -1
134
};
135
140
enum class
Strategy
141
{
147
normal
,
148
154
filtered
,
155
161
huffman
,
162
169
rle
,
170
176
fixed
177
};
178
179
}
// zlib
180
}
// beast
181
}
// boost
182
183
#endif
184
boost::beast::zlib::Strategy::rle
boost::beast::zlib::z_params::data_type
int data_type
Definition:
zlib.hpp:109
boost::beast::zlib::Z_BEST_SPEED
Definition:
zlib.hpp:131
boost
Definition:
async_result.hpp:20
boost::beast::zlib::Strategy::normal
boost::beast::zlib::Z_UNKNOWN
Definition:
zlib.hpp:59
boost::beast::zlib::z_params
Definition:
zlib.hpp:79
boost::beast::zlib::Z_NO_COMPRESSION
Definition:
zlib.hpp:130
boost::beast::zlib::z_params::total_out
std::size_t total_out
Definition:
zlib.hpp:107
boost::beast::zlib::Z_BINARY
Definition:
zlib.hpp:57
boost::beast::zlib::Strategy::huffman
boost::beast::zlib::Flush::none
boost::beast::zlib::Byte
unsigned char Byte
Definition:
zlib.hpp:50
boost::beast::zlib::uInt
unsigned int uInt
Definition:
zlib.hpp:52
boost::beast::zlib::Z_TEXT
Definition:
zlib.hpp:58
boost::beast::zlib::Flush
Flush
Definition:
zlib.hpp:114
boost::beast::zlib::z_params::total_in
std::size_t total_in
Definition:
zlib.hpp:95
boost::beast::zlib::Flush::full
boost::beast::zlib::z_Compression
z_Compression
Definition:
zlib.hpp:128
boost::beast::zlib::z_Type
z_Type
Definition:
zlib.hpp:55
boost::beast::zlib::Strategy::filtered
boost::beast::zlib::z_params::next_in
void const * next_in
Definition:
zlib.hpp:85
boost::beast::zlib::z_params::next_out
void * next_out
Definition:
zlib.hpp:99
boost::beast::zlib::Flush::partial
boost::beast::zlib::z_params::avail_out
std::size_t avail_out
Definition:
zlib.hpp:103
boost::beast::zlib::Flush::finish
boost::beast::zlib::z_params::avail_in
std::size_t avail_in
Definition:
zlib.hpp:91
boost::beast::zlib::Flush::block
config.hpp
boost::beast::zlib::Flush::sync
boost::beast::zlib::Flush::trees
boost::beast::zlib::Strategy::fixed
boost::beast::zlib::Strategy
Strategy
Definition:
zlib.hpp:140
boost::beast::zlib::Z_BEST_COMPRESSION
Definition:
zlib.hpp:132
boost::beast::zlib::Z_DEFAULT_COMPRESSION
Definition:
zlib.hpp:133
Generated by
1.8.11