kusano 7d535a
kusano 7d535a
This directory contains a Pascal (Delphi, Kylix) interface to the
kusano 7d535a
zlib data compression library.
kusano 7d535a
kusano 7d535a
kusano 7d535a
Directory listing
kusano 7d535a
=================
kusano 7d535a
kusano 7d535a
zlibd32.mak     makefile for Borland C++
kusano 7d535a
example.pas     usage example of zlib
kusano 7d535a
zlibpas.pas     the Pascal interface to zlib
kusano 7d535a
readme.txt      this file
kusano 7d535a
kusano 7d535a
kusano 7d535a
Compatibility notes
kusano 7d535a
===================
kusano 7d535a
kusano 7d535a
- Although the name "zlib" would have been more normal for the
kusano 7d535a
  zlibpas unit, this name is already taken by Borland's ZLib unit.
kusano 7d535a
  This is somehow unfortunate, because that unit is not a genuine
kusano 7d535a
  interface to the full-fledged zlib functionality, but a suite of
kusano 7d535a
  class wrappers around zlib streams.  Other essential features,
kusano 7d535a
  such as checksums, are missing.
kusano 7d535a
  It would have been more appropriate for that unit to have a name
kusano 7d535a
  like "ZStreams", or something similar.
kusano 7d535a
kusano 7d535a
- The C and zlib-supplied types int, uInt, long, uLong, etc. are
kusano 7d535a
  translated directly into Pascal types of similar sizes (Integer,
kusano 7d535a
  LongInt, etc.), to avoid namespace pollution.  In particular,
kusano 7d535a
  there is no conversion of unsigned int into a Pascal unsigned
kusano 7d535a
  integer.  The Word type is non-portable and has the same size
kusano 7d535a
  (16 bits) both in a 16-bit and in a 32-bit environment, unlike
kusano 7d535a
  Integer.  Even if there is a 32-bit Cardinal type, there is no
kusano 7d535a
  real need for unsigned int in zlib under a 32-bit environment.
kusano 7d535a
kusano 7d535a
- Except for the callbacks, the zlib function interfaces are
kusano 7d535a
  assuming the calling convention normally used in Pascal
kusano 7d535a
  (__pascal for DOS and Windows16, __fastcall for Windows32).
kusano 7d535a
  Since the cdecl keyword is used, the old Turbo Pascal does
kusano 7d535a
  not work with this interface.
kusano 7d535a
kusano 7d535a
- The gz* function interfaces are not translated, to avoid
kusano 7d535a
  interfacing problems with the C runtime library.  Besides,
kusano 7d535a
    gzprintf(gzFile file, const char *format, ...)
kusano 7d535a
  cannot be translated into Pascal.
kusano 7d535a
kusano 7d535a
kusano 7d535a
Legal issues
kusano 7d535a
============
kusano 7d535a
kusano 7d535a
The zlibpas interface is:
kusano 7d535a
  Copyright (C) 1995-2003 Jean-loup Gailly and Mark Adler.
kusano 7d535a
  Copyright (C) 1998 by Bob Dellaca.
kusano 7d535a
  Copyright (C) 2003 by Cosmin Truta.
kusano 7d535a
kusano 7d535a
The example program is:
kusano 7d535a
  Copyright (C) 1995-2003 by Jean-loup Gailly.
kusano 7d535a
  Copyright (C) 1998,1999,2000 by Jacques Nomssi Nzali.
kusano 7d535a
  Copyright (C) 2003 by Cosmin Truta.
kusano 7d535a
kusano 7d535a
  This software is provided 'as-is', without any express or implied
kusano 7d535a
  warranty.  In no event will the author be held liable for any damages
kusano 7d535a
  arising from the use of this software.
kusano 7d535a
kusano 7d535a
  Permission is granted to anyone to use this software for any purpose,
kusano 7d535a
  including commercial applications, and to alter it and redistribute it
kusano 7d535a
  freely, subject to the following restrictions:
kusano 7d535a
kusano 7d535a
  1. The origin of this software must not be misrepresented; you must not
kusano 7d535a
     claim that you wrote the original software. If you use this software
kusano 7d535a
     in a product, an acknowledgment in the product documentation would be
kusano 7d535a
     appreciated but is not required.
kusano 7d535a
  2. Altered source versions must be plainly marked as such, and must not be
kusano 7d535a
     misrepresented as being the original software.
kusano 7d535a
  3. This notice may not be removed or altered from any source distribution.
kusano 7d535a