Compress::Zlib

                                  Version 1.18

                                24 October 2002

             Copyright (c) 1995-2002 Paul Marquess. All rights reserved.
            This program is free software; you can redistribute it and/or
                modify it under the same terms as Perl itself.



DESCRIPTION
-----------

This module provides a Perl interface to most of the zlib compression
library.  For more details see the pod documentation embedded in the
file Zlib.pm.

If you have downloaded this module in the expectation of manipulating the
contents of .zip files, you will need to fetch and build the Archive::Zip
module below once you have installed this one.

    http://www.cpan.org/modules/by-module/Archive/Archive-Zip-*.tar.gz


PREREQUISITES
-------------

Before you can build Compress::Zlib you need to have the following
installed on your system:

    * Perl 5.004 or better. 

    * The zlib compression library, version 1.0.2 or better 
      NOTE that this module is NOT compatible with versions of zlib <= 1.0.1

      The zlib compression library is available at

          http://www.gzip.org/zlib/


When building Compress::Zlib, you can optionally build the zlib
library at the same time. If you are running Windows 95/98/NT, this
seems to be the most straightforward option.

If you want Compress::Zlib to build zlib, fetch a copy of the zlib
distribution from the site mentioned above and unpack it into the
Compress::Zlib source directory. If you have fetched zlib 1.1.4, it will
create a directory called zlib-1.1.4.

Now, whether you are building zlib or not, edit the file config.in
and follow the instructions given in it.

BUILDING THE MODULE
-------------------

Assuming you have met all the prerequisites, the module can now be built
using this sequence of commands:

Step 1 :  Edit the file config.in to suit you local installation.
          Instructions are given in the file. 

Step 2 :  Build and test the module using this sequence of commands:

              perl Makefile.PL
              make
              make test

INSTALLATION
------------

To install Compress::Zlib, run the command below:

    make install

UPDATES
-------
 
The most recent version of Compress::Zlib is always available at
 
    http://www.cpan.org/modules/by-module/Compress/

TROUBLESHOOTING
---------------

Undefined Symbol gzsetparams
----------------------------

If you get the error shown below when you run the Compress::Zlib test
harness it probably means you are running a copy of zlib that is version
1.0.5 or older. 

t/01version.........Can't load 'blib/arch/auto/Compress/Zlib/Zlib.so' for 
                    module Compress::Zlib: blib/arch/auto/Compress/Zlib/Zlib.so:
                    undefined symbol: gzsetparams at ...

There are two ways to fix this problem:

    1. Upgrade to the latest version of zlib.

    2. Edit config.in and set the OLD_ZLIB variable to True.


Test Harness 01version fails
----------------------------
If the 01version test harness fails, and the problem isn't covered by
the scenario above, it probably means that you have two versions of zlib
installed on your system.

Run the command below to see if this is indeed the case

    make test TEST_VERBOSE=1 TEST_FILES=t/01version.t 

Try removing the one you don't want to use and rebuild.   

HP-UX
-----

I've had a report that when building Compress::Zlib under HP-UX that it is
necessary to have first built the zlib library with the -fpic option.

Linux Notes
-----------

Although most Linux distributions already come with zlib, some people
report getting this error when they try to build this module:

$ make
cp Zlib.pm blib/lib/Compress/Zlib.pm
AutoSplitting blib/lib/Compress/Zlib.pm (blib/lib/auto/Compress/Zlib)
/usr/bin/perl -I/usr/lib/perl5/5.6.1/i386-linux -I/usr/lib/perl5/5.6.1 /usr/lib/perl5/5.6.1/ExtUtils/xsubpp  -typemap /usr/lib/perl5/5.6.1/ExtUtils/typemap -typemap typemap Zlib.xs > Zlib.xsc && mv Zlib.xsc Zlib.c
gcc -c -I/usr/local/include -fno-strict-aliasing -I/usr/local/include -O2 -march=i386 -mcpu=i686   -DVERSION=\"1.16\" -DXS_VERSION=\"1.16\" -fPIC -I/usr/lib/perl5/5.6.1/i386-linux/CORE  Zlib.c
Zlib.xs:25:19: zlib.h: No such file or directory
make: *** [Zlib.o] Error 1

This usually means that you have not installed the development RPM
for zlib. Check for an RPM that start with "zlib-devel" in your Linux
distribution.


FEEDBACK
--------

How to report a problem with Compress::Zlib.

To help me help you, I need all of the following information:

 1. The *complete* output from running this
 
        perl -V
 
    Do not edit the output in any way.
    Note, I want you to run "perl -V" and NOT "perl -v".
 
    If your perl does not understand the "-V" option it is too
    old. This module needs Perl version 5.004 or better.     

 2. The version of Compress::Zlib you have. 
    If you have successfully installed Compress::Zlib, this one-liner
    will tell you:

       perl -MCompress::Zlib -e 'print "ver $Compress::Zlib::VERSION\n"'

    If you haven't installed Compress::Zlib then search Compress::Zlib.pm
    for a line like this:

      $VERSION = "1.05" ;

 3. The version of zlib you have installed.
    If you have successfully installed Compress::Zlib, this one-liner
    will tell you:

      perl -MCompress::Zlib -e 'print "zlib ver ". Compress::Zlib::ZLIB_VERSION."\n"' 

    If not, look at the beginning of the file zlib.h. 

 4. If you are having problems building Compress::Zlib, send me a
    complete log of what happened. Start by unpacking the Compress:Zlib
    module into a fresh directory and keep a log of all the steps

        [edit config.in, if necessary]
        perl Makefile.PL
        make
        make test TEST_VERBOSE=1          


Paul Marquess <Paul.Marquess@btinternet.com>