Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:29:36

0001 //
0002 // Copyright (c) 2016-2019 Vinnie Falco (vinnie dot falco at gmail dot com)
0003 //
0004 // Distributed under the Boost Software License, Version 1.0. (See accompanying
0005 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0006 //
0007 // Official repository: https://github.com/boostorg/beast
0008 //
0009 // This is a derivative work based on Zlib, copyright below:
0010 /*
0011     Copyright (C) 1995-2013 Jean-loup Gailly and Mark Adler
0012 
0013     This software is provided 'as-is', without any express or implied
0014     warranty.  In no event will the authors be held liable for any damages
0015     arising from the use of this software.
0016 
0017     Permission is granted to anyone to use this software for any purpose,
0018     including commercial applications, and to alter it and redistribute it
0019     freely, subject to the following restrictions:
0020 
0021     1. The origin of this software must not be misrepresented; you must not
0022        claim that you wrote the original software. If you use this software
0023        in a product, an acknowledgment in the product documentation would be
0024        appreciated but is not required.
0025     2. Altered source versions must be plainly marked as such, and must not be
0026        misrepresented as being the original software.
0027     3. This notice may not be removed or altered from any source distribution.
0028 
0029     Jean-loup Gailly        Mark Adler
0030     jloup@gzip.org          madler@alumni.caltech.edu
0031 
0032     The data format used by the zlib library is described by RFCs (Request for
0033     Comments) 1950 to 1952 in the files http://tools.ietf.org/html/rfc1950
0034     (zlib format), rfc1951 (deflate format) and rfc1952 (gzip format).
0035 */
0036 
0037 #ifndef BOOST_BEAST_ZLIB_ERROR_HPP
0038 #define BOOST_BEAST_ZLIB_ERROR_HPP
0039 
0040 #include <boost/beast/core/detail/config.hpp>
0041 #include <boost/beast/core/error.hpp>
0042 
0043 namespace boost {
0044 namespace beast {
0045 namespace zlib {
0046 
0047 /** Error codes returned by the deflate codecs.
0048 */
0049 enum class error
0050 {
0051     /** Additional buffers are required.
0052 
0053         This error indicates that one or both of the buffers
0054         provided buffers do not have sufficient available bytes
0055         to make forward progress.
0056 
0057         This does not always indicate a failure condition.
0058 
0059         @note This is the same as `Z_BUF_ERROR` returned by ZLib.
0060     */
0061     need_buffers = 1,
0062 
0063     /** End of stream reached.
0064 
0065         @note This is the same as `Z_STREAM_END` returned by ZLib.
0066     */
0067     end_of_stream,
0068 
0069     /** Preset dictionary required
0070 
0071         This error indicates that a preset dictionary was not provided and is now
0072         needed at this point.
0073 
0074         This does not always indicate a failure condition.
0075 
0076         @note This is the same as `Z_NEED_DICT` returned by ZLib.
0077     */
0078     need_dict,
0079 
0080     /** Invalid stream or parameters.
0081 
0082         This error is returned when invalid parameters are passed,
0083         or the operation being performed is not consistent with the
0084         state of the stream. For example, attempting to write data
0085         when the end of stream is already reached.
0086 
0087         @note This is the same as `Z_STREAM_ERROR` returned by ZLib.
0088     */
0089     stream_error,
0090 
0091     //
0092     // Errors generated by basic_deflate_stream
0093     //
0094 
0095     //
0096     // Errors generated by basic_inflate_stream
0097     //
0098 
0099     /// Invalid block type
0100     invalid_block_type,
0101 
0102     /// Invalid stored block length
0103     invalid_stored_length,
0104 
0105     /// Too many length or distance symbols
0106     too_many_symbols,
0107 
0108     /// Invalid code lengths
0109     invalid_code_lengths,
0110 
0111     /// Invalid bit length repeat
0112     invalid_bit_length_repeat,
0113 
0114     /// Missing end of block code
0115     missing_eob,
0116 
0117     /// Invalid literal/length code
0118     invalid_literal_length,
0119 
0120     /// Invalid distance code
0121     invalid_distance_code,
0122 
0123     /// Invalid distance too far back
0124     invalid_distance,
0125 
0126     //
0127     // Errors generated by inflate_table
0128     //
0129 
0130     /// Over-subscribed length code
0131     over_subscribed_length,
0132 
0133     /// Incomplete length set
0134     incomplete_length_set,
0135 
0136 
0137 
0138     /// general error
0139     general
0140 };
0141 
0142 } // zlib
0143 } // beast
0144 } // boost
0145 
0146 #include <boost/beast/zlib/impl/error.hpp>
0147 #ifdef BOOST_BEAST_HEADER_ONLY
0148 #include <boost/beast/zlib/impl/error.ipp>
0149 #endif
0150 
0151 #endif
0152