Boost logo

Boost :

From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2021-03-23 10:53:07


On 3/23/21 8:14 AM, Vinnie Falco via Boost wrote:
> Beast currently has its own port of ZLib to C++:
>
> <https://github.com/boostorg/beast/tree/develop/include/boost/beast/zlib>
>
> Is there any interest in having this proposed as its own separate
> Boost library (with a separate review, which has nothing to do with
> Beast)? The differences would be as follows:
>
> * Ported to use C++11 idioms
> * Same header-only / compiled source model as Boost.JSON
> * Better documentation and clear API
> * Improved tests
>
> Programs which use this C++ port of ZLib would get their zlib
> dependency from Boost instead of the official zlib distribution. And
> they can integrate it into their projects the same way that Boost
> libraries are integrated. Or they can include <boost/zlib/src.hpp> in
> any one translation unit (like JSON).
>
> The motivation for this is twofold:
>
> * Provide an easier way for users to access ZLib's functionality
> * To use this in some new libraries that I'm going to propose

I would most probably *not* use it and rely on zlib or zlib-ng because
(a) it would probably be used by other libraries that are not part of
your ecosystem, (b) because its maintenance would be a someone else's
burden (e.g. a distro maintainer's) and not mine, and (c), especially in
zlib-ng case, I suspect it would be better optimized than your
header-only version.

Because of this I'd like to ask you to at least provide an option to
build your present and future libraries against zlib.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk