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