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