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