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