mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
6d5547a Set version to 1.0.0-b34 6fab138 Fix and tidy up CMake build scripts: ccefa54 Set version to 1.0.0-b33 32afe41 Set internal state correctly when writing frames: fe3e20b Add write_frames unit test 578dcd0 Add decorator unit test aaa3733 Use fwrite return value in file_body df66165 Require Visual Studio 2015 Update 3 or later b8e5a21 Set version to 1.0.0-b32 ffb1758 Update CMake scripts for finding packages: b893749 Remove http Writer suspend and resume feature (API Change): 27864fb Add io_service completion invariants tests eba05a7 Set version to 1.0.0-b31 484bcef Fix badge markdown in README.md 5663bea Add missing dynabuf_readstream member 0d7a551 Tidy up build settings 0fd4030 Move the handler, don't copy it git-subtree-dir: src/beast git-subtree-split: 6d5547a32c50ec95832c4779311502555ab0ee1f
135 lines
3.5 KiB
C++
135 lines
3.5 KiB
C++
//
|
|
// Copyright (c) 2013-2017 Vinnie Falco (vinnie dot falco at gmail dot com)
|
|
//
|
|
// Distributed under the Boost Software License, Version 1.0. (See accompanying
|
|
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
|
//
|
|
// This is a derivative work based on Zlib, copyright below:
|
|
/*
|
|
Copyright (C) 1995-2013 Jean-loup Gailly and Mark Adler
|
|
|
|
This software is provided 'as-is', without any express or implied
|
|
warranty. In no event will the authors be held liable for any damages
|
|
arising from the use of this software.
|
|
|
|
Permission is granted to anyone to use this software for any purpose,
|
|
including commercial applications, and to alter it and redistribute it
|
|
freely, subject to the following restrictions:
|
|
|
|
1. The origin of this software must not be misrepresented; you must not
|
|
claim that you wrote the original software. If you use this software
|
|
in a product, an acknowledgment in the product documentation would be
|
|
appreciated but is not required.
|
|
2. Altered source versions must be plainly marked as such, and must not be
|
|
misrepresented as being the original software.
|
|
3. This notice may not be removed or altered from any source distribution.
|
|
|
|
Jean-loup Gailly Mark Adler
|
|
jloup@gzip.org madler@alumni.caltech.edu
|
|
|
|
The data format used by the zlib library is described by RFCs (Request for
|
|
Comments) 1950 to 1952 in the files http://tools.ietf.org/html/rfc1950
|
|
(zlib format), rfc1951 (deflate format) and rfc1952 (gzip format).
|
|
*/
|
|
|
|
#ifndef BEAST_ZLIB_ERROR_HPP
|
|
#define BEAST_ZLIB_ERROR_HPP
|
|
|
|
#include <beast/config.hpp>
|
|
#include <beast/core/error.hpp>
|
|
|
|
namespace beast {
|
|
namespace zlib {
|
|
|
|
/** Error codes returned by the codec.
|
|
*/
|
|
enum class error
|
|
{
|
|
/** Additional buffers are required.
|
|
|
|
This error indicates that one or both of the buffers
|
|
provided buffers do not have sufficient available bytes
|
|
to make forward progress.
|
|
|
|
This does not always indicate a failure condition.
|
|
|
|
@note This is the same as `Z_BUF_ERROR` returned by ZLib.
|
|
*/
|
|
need_buffers = 1,
|
|
|
|
/** End of stream reached.
|
|
|
|
@note This is the same as `Z_STREAM_END` returned by ZLib.
|
|
*/
|
|
end_of_stream,
|
|
|
|
/** Invalid stream or parameters.
|
|
|
|
This error is returned when invalid parameters are passed,
|
|
or the operation being performed is not consistent with the
|
|
state of the stream. For example, attempting to write data
|
|
when the end of stream is already reached.
|
|
|
|
@note This is the same as `Z_STREAM_ERROR` returned by ZLib.
|
|
*/
|
|
stream_error,
|
|
|
|
//
|
|
// Errors generated by basic_deflate_stream
|
|
//
|
|
|
|
//
|
|
// Errors generated by basic_inflate_stream
|
|
//
|
|
|
|
/// Invalid block type
|
|
invalid_block_type,
|
|
|
|
/// Invalid stored block length
|
|
invalid_stored_length,
|
|
|
|
/// Too many length or distance symbols
|
|
too_many_symbols,
|
|
|
|
/// Invalid code lengths
|
|
invalid_code_lenths,
|
|
|
|
/// Invalid bit length repeat
|
|
invalid_bit_length_repeat,
|
|
|
|
/// Missing end of block code
|
|
missing_eob,
|
|
|
|
/// Invalid literal/length code
|
|
invalid_literal_length,
|
|
|
|
/// Invalid distance code
|
|
invalid_distance_code,
|
|
|
|
/// Invalid distance too far back
|
|
invalid_distance,
|
|
|
|
//
|
|
// Errors generated by inflate_table
|
|
//
|
|
|
|
/// Over-subscribed length code
|
|
over_subscribed_length,
|
|
|
|
/// Incomplete length set
|
|
incomplete_length_set,
|
|
|
|
|
|
|
|
/// general error
|
|
general
|
|
};
|
|
|
|
} // zlib
|
|
} // beast
|
|
|
|
#include <beast/zlib/impl/error.ipp>
|
|
|
|
#endif
|
|
|