2 // Copyright (c) 2016-2019 Vinnie Falco (vinnie dot falco at gmail dot com)
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)
7 // Official repository: https://github.com/boostorg/beast
9 // This is a derivative work based on Zlib, copyright below:
11 Copyright (C) 1995-2013 Jean-loup Gailly and Mark Adler
13 This software is provided 'as-is', without any express or implied
14 warranty. In no event will the authors be held liable for any damages
15 arising from the use of this software.
17 Permission is granted to anyone to use this software for any purpose,
18 including commercial applications, and to alter it and redistribute it
19 freely, subject to the following restrictions:
21 1. The origin of this software must not be misrepresented; you must not
22 claim that you wrote the original software. If you use this software
23 in a product, an acknowledgment in the product documentation would be
24 appreciated but is not required.
25 2. Altered source versions must be plainly marked as such, and must not be
26 misrepresented as being the original software.
27 3. This notice may not be removed or altered from any source distribution.
29 Jean-loup Gailly Mark Adler
30 jloup@gzip.org madler@alumni.caltech.edu
32 The data format used by the zlib library is described by RFCs (Request for
33 Comments) 1950 to 1952 in the files http://tools.ietf.org/html/rfc1950
34 (zlib format), rfc1951 (deflate format) and rfc1952 (gzip format).
37 #ifndef BOOST_BEAST_ZLIB_ERROR_HPP
38 #define BOOST_BEAST_ZLIB_ERROR_HPP
40 #include <boost/beast/core/detail/config.hpp>
41 #include <boost/beast/core/error.hpp>
47 /** Error codes returned by the deflate codecs.
51 /** Additional buffers are required.
53 This error indicates that one or both of the buffers
54 provided buffers do not have sufficient available bytes
55 to make forward progress.
57 This does not always indicate a failure condition.
59 @note This is the same as `Z_BUF_ERROR` returned by ZLib.
63 /** End of stream reached.
65 @note This is the same as `Z_STREAM_END` returned by ZLib.
69 /** Preset dictionary required
71 This error indicates that a preset dictionary was not provided and is now
74 This does not always indicate a failure condition.
76 @note This is the same as `Z_NEED_DICT` returned by ZLib.
80 /** Invalid stream or parameters.
82 This error is returned when invalid parameters are passed,
83 or the operation being performed is not consistent with the
84 state of the stream. For example, attempting to write data
85 when the end of stream is already reached.
87 @note This is the same as `Z_STREAM_ERROR` returned by ZLib.
92 // Errors generated by basic_deflate_stream
96 // Errors generated by basic_inflate_stream
99 /// Invalid block type
102 /// Invalid stored block length
103 invalid_stored_length,
105 /// Too many length or distance symbols
108 /// Invalid code lengths
109 invalid_code_lengths,
110 #ifndef BOOST_BEAST_NO_DEPRECATED
111 invalid_code_lenths = invalid_code_lengths,
114 /// Invalid bit length repeat
115 invalid_bit_length_repeat,
117 /// Missing end of block code
120 /// Invalid literal/length code
121 invalid_literal_length,
123 /// Invalid distance code
124 invalid_distance_code,
126 /// Invalid distance too far back
130 // Errors generated by inflate_table
133 /// Over-subscribed length code
134 over_subscribed_length,
136 /// Incomplete length set
137 incomplete_length_set,
149 #include <boost/beast/zlib/impl/error.hpp>
150 #ifdef BOOST_BEAST_HEADER_ONLY
151 #include <boost/beast/zlib/impl/error.ipp>