Boost C++ Libraries of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of Boost. Click here to view this page for the latest version.


// Copyright (c) 2016-2019 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
// Official repository:
// 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

    The data format used by the zlib library is described by RFCs (Request for
    Comments) 1950 to 1952 in the files
    (zlib format), rfc1951 (deflate format) and rfc1952 (gzip format).


#include <boost/beast/core/detail/config.hpp>
#include <boost/beast/core/error.hpp>

namespace boost {
namespace beast {
namespace zlib {

/** Error codes returned by the deflate codecs.
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.

    /** Preset dictionary required

        This error indicates that a preset dictionary was not provided and is now
        needed at this point.

        This does not always indicate a failure condition.

        @note This is the same as `Z_NEED_DICT` returned by ZLib.

    /** 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.

    // Errors generated by basic_deflate_stream

    // Errors generated by basic_inflate_stream

    /// Invalid block type

    /// Invalid stored block length

    /// Too many length or distance symbols

    /// Invalid code lengths

    /// Invalid bit length repeat

    /// Missing end of block code

    /// Invalid literal/length code

    /// Invalid distance code

    /// Invalid distance too far back

    // Errors generated by inflate_table

    /// Over-subscribed length code

    /// Incomplete length set

    /// general error

} // zlib
} // beast
} // boost

#include <boost/beast/zlib/impl/error.hpp>
#include <boost/beast/zlib/impl/error.ipp>