|
Boost : |
Subject: Re: [boost] [iostreams][gzip][zlib] zlib vs gzip, and linking against external libraries
From: Arindam Mukherjee (arindam.mukerjee_at_[hidden])
Date: 2015-01-17 15:29:18
> What is the difference in functionality between gzip and zlib compression?
>
I think gzip and zlib are two different variants of the DEFLATE
algorithm and they differ in their header information.
> I built Boost iostreams library on Linux after exporting ZLIB_SOURCE and BZIP2_SOURCE environment variables. However when I build a sample program using gzip / bzip2 with IOStreams, I do not need to link to libzlib or libbz2. Is the zlib / bz2 code built into libboost_iostreams in this case?
>
> For reference, this is the command line I used to build the iostreams library.
>
> ./b2 --with-iostreams --build-dir=../build threading=multi variant=release link=shared runtime-link=shared
>
The following page lists build settings for iostreams.
http://www.boost.org/doc/libs/1_57_0/libs/iostreams/doc/installation.html
Gives me the impression that you can build against source or against
pre-built libraries for zlib / bzip2. I guess if you built against
source, then you don't need to separately link against zlib / bzip2
libraries.
Arindam
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk