kusano fc6ab3
        ZLIB version 1.2.8 for AS400 installation instructions
kusano fc6ab3
kusano fc6ab3
I) From an AS400 *SAVF file:
kusano fc6ab3
kusano fc6ab3
1)      Unpacking archive to an AS400 save file
kusano fc6ab3
kusano fc6ab3
On the AS400:
kusano fc6ab3
kusano fc6ab3
_       Create the ZLIB AS400 library:
kusano fc6ab3
kusano fc6ab3
        CRTLIB LIB(ZLIB) TYPE(*PROD) TEXT('ZLIB compression API library')
kusano fc6ab3
kusano fc6ab3
_       Create a work save file, for example:
kusano fc6ab3
kusano fc6ab3
                CRTSAVF FILE(ZLIB/ZLIBSAVF)
kusano fc6ab3
kusano fc6ab3
On a PC connected to the target AS400:
kusano fc6ab3
kusano fc6ab3
_       Unpack the save file image to a PC file "ZLIBSAVF"
kusano fc6ab3
_       Upload this file into the save file on the AS400, for example
kusano fc6ab3
                using ftp in BINARY mode.
kusano fc6ab3
kusano fc6ab3
kusano fc6ab3
2)      Populating the ZLIB AS400 source library
kusano fc6ab3
kusano fc6ab3
On the AS400:
kusano fc6ab3
kusano fc6ab3
_       Extract the saved objects into the ZLIB AS400 library using:
kusano fc6ab3
kusano fc6ab3
RSTOBJ OBJ(*ALL) SAVLIB(ZLIB) DEV(*SAVF) SAVF(ZLIB/ZLIBSAVF) RSTLIB(ZLIB)
kusano fc6ab3
kusano fc6ab3
kusano fc6ab3
3)      Customize installation:
kusano fc6ab3
kusano fc6ab3
_       Edit CL member ZLIB/TOOLS(COMPILE) and change parameters if needed,
kusano fc6ab3
                according to the comments.
kusano fc6ab3
kusano fc6ab3
_       Compile this member with:
kusano fc6ab3
kusano fc6ab3
        CRTCLPGM PGM(ZLIB/COMPILE) SRCFILE(ZLIB/TOOLS) SRCMBR(COMPILE)
kusano fc6ab3
kusano fc6ab3
kusano fc6ab3
4)      Compile and generate the service program:
kusano fc6ab3
kusano fc6ab3
_       This can now be done by executing:
kusano fc6ab3
kusano fc6ab3
        CALL PGM(ZLIB/COMPILE)
kusano fc6ab3
kusano fc6ab3
kusano fc6ab3
kusano fc6ab3
II) From the original source distribution:
kusano fc6ab3
kusano fc6ab3
1)      On the AS400, create the source library:
kusano fc6ab3
kusano fc6ab3
        CRTLIB LIB(ZLIB) TYPE(*PROD) TEXT('ZLIB compression API library')
kusano fc6ab3
kusano fc6ab3
2)      Create the source files:
kusano fc6ab3
kusano fc6ab3
        CRTSRCPF FILE(ZLIB/SOURCES) RCDLEN(112) TEXT('ZLIB library modules')
kusano fc6ab3
        CRTSRCPF FILE(ZLIB/H)       RCDLEN(112) TEXT('ZLIB library includes')
kusano fc6ab3
        CRTSRCPF FILE(ZLIB/TOOLS)   RCDLEN(112) TEXT('ZLIB library control utilities')
kusano fc6ab3
kusano fc6ab3
3)      From the machine hosting the distribution files, upload them (with
kusano fc6ab3
                FTP in text mode, for example) according to the following table:
kusano fc6ab3
kusano fc6ab3
    Original    AS400   AS400    AS400 AS400
kusano fc6ab3
    file        file    member   type  description
kusano fc6ab3
                SOURCES                Original ZLIB C subprogram sources
kusano fc6ab3
    adler32.c           ADLER32  C     ZLIB - Compute the Adler-32 checksum of a dta strm
kusano fc6ab3
    compress.c          COMPRESS C     ZLIB - Compress a memory buffer
kusano fc6ab3
    crc32.c             CRC32    C     ZLIB - Compute the CRC-32 of a data stream
kusano fc6ab3
    deflate.c           DEFLATE  C     ZLIB - Compress data using the deflation algorithm
kusano fc6ab3
    gzclose.c           GZCLOSE  C     ZLIB - Close .gz files
kusano fc6ab3
    gzlib.c             GZLIB    C     ZLIB - Miscellaneous .gz files IO support
kusano fc6ab3
    gzread.c            GZREAD   C     ZLIB - Read .gz files
kusano fc6ab3
    gzwrite.c           GZWRITE  C     ZLIB - Write .gz files
kusano fc6ab3
    infback.c           INFBACK  C     ZLIB - Inflate using a callback interface
kusano fc6ab3
    inffast.c           INFFAST  C     ZLIB - Fast proc. literals & length/distance pairs
kusano fc6ab3
    inflate.c           INFLATE  C     ZLIB - Interface to inflate modules
kusano fc6ab3
    inftrees.c          INFTREES C     ZLIB - Generate Huffman trees for efficient decode
kusano fc6ab3
    trees.c             TREES    C     ZLIB - Output deflated data using Huffman coding
kusano fc6ab3
    uncompr.c           UNCOMPR  C     ZLIB - Decompress a memory buffer
kusano fc6ab3
    zutil.c             ZUTIL    C     ZLIB - Target dependent utility functions
kusano fc6ab3
                H                      Original ZLIB C and ILE/RPG include files
kusano fc6ab3
    crc32.h             CRC32    C     ZLIB - CRC32 tables
kusano fc6ab3
    deflate.h           DEFLATE  C     ZLIB - Internal compression state
kusano fc6ab3
    gzguts.h            GZGUTS   C     ZLIB - Definitions for the gzclose module
kusano fc6ab3
    inffast.h           INFFAST  C     ZLIB - Header to use inffast.c
kusano fc6ab3
    inffixed.h          INFFIXED C     ZLIB - Table for decoding fixed codes
kusano fc6ab3
    inflate.h           INFLATE  C     ZLIB - Internal inflate state definitions
kusano fc6ab3
    inftrees.h          INFTREES C     ZLIB - Header to use inftrees.c
kusano fc6ab3
    trees.h             TREES    C     ZLIB - Created automatically with -DGEN_TREES_H
kusano fc6ab3
    zconf.h             ZCONF    C     ZLIB - Compression library configuration
kusano fc6ab3
    zlib.h              ZLIB     C     ZLIB - Compression library C user interface
kusano fc6ab3
    as400/zlib.inc      ZLIB.INC RPGLE ZLIB - Compression library ILE RPG user interface
kusano fc6ab3
    zutil.h             ZUTIL    C     ZLIB - Internal interface and configuration
kusano fc6ab3
                TOOLS                  Building source software & AS/400 README
kusano fc6ab3
    as400/bndsrc        BNDSRC         Entry point exportation list
kusano fc6ab3
    as400/compile.clp   COMPILE  CLP   Compile sources & generate service program
kusano fc6ab3
    as400/readme.txt    README   TXT   Installation instructions
kusano fc6ab3
kusano fc6ab3
4)      Continue as in I)3).
kusano fc6ab3
kusano fc6ab3
kusano fc6ab3
kusano fc6ab3
kusano fc6ab3
Notes:  For AS400 ILE RPG programmers, a /copy member defining the ZLIB
kusano fc6ab3
                API prototypes for ILE RPG can be found in ZLIB/H(ZLIB.INC).
kusano fc6ab3
                Please read comments in this member for more information.
kusano fc6ab3
kusano fc6ab3
        Remember that most foreign textual data are ASCII coded: this
kusano fc6ab3
                implementation does not handle conversion from/to ASCII, so
kusano fc6ab3
                text data code conversions must be done explicitely.
kusano fc6ab3
kusano fc6ab3
        Mainly for the reason above, always open zipped files in binary mode.