| 1 |  | 
 
 
 
 
 | 2 | This directory contains a Pascal (Delphi, Kylix) interface to the | 
 
 
 
 
 | 3 | zlib data compression library. | 
 
 
 
 
 | 4 |  | 
 
 
 
 
 | 5 |  | 
 
 
 
 
 | 6 | Directory listing | 
 
 
 
 
 | 7 | ================= | 
 
 
 
 
 | 8 |  | 
 
 
 
 
 | 9 | zlibd32.mak     makefile for Borland C++ | 
 
 
 
 
 | 10 | example.pas     usage example of zlib | 
 
 
 
 
 | 11 | zlibpas.pas     the Pascal interface to zlib | 
 
 
 
 
 | 12 | readme.txt      this file | 
 
 
 
 
 | 13 |  | 
 
 
 
 
 | 14 |  | 
 
 
 
 
 | 15 | Compatibility notes | 
 
 
 
 
 | 16 | =================== | 
 
 
 
 
 | 17 |  | 
 
 
 
 
 | 18 | - Although the name "zlib" would have been more normal for the | 
 
 
 
 
 | 19 | zlibpas unit, this name is already taken by Borland's ZLib unit. | 
 
 
 
 
 | 20 | This is somehow unfortunate, because that unit is not a genuine | 
 
 
 
 
 | 21 | interface to the full-fledged zlib functionality, but a suite of | 
 
 
 
 
 | 22 | class wrappers around zlib streams.  Other essential features, | 
 
 
 
 
 | 23 | such as checksums, are missing. | 
 
 
 
 
 | 24 | It would have been more appropriate for that unit to have a name | 
 
 
 
 
 | 25 | like "ZStreams", or something similar. | 
 
 
 
 
 | 26 |  | 
 
 
 
 
 | 27 | - The C and zlib-supplied types int, uInt, long, uLong, etc. are | 
 
 
 
 
 | 28 | translated directly into Pascal types of similar sizes (Integer, | 
 
 
 
 
 | 29 | LongInt, etc.), to avoid namespace pollution.  In particular, | 
 
 
 
 
 | 30 | there is no conversion of unsigned int into a Pascal unsigned | 
 
 
 
 
 | 31 | integer.  The Word type is non-portable and has the same size | 
 
 
 
 
 | 32 | (16 bits) both in a 16-bit and in a 32-bit environment, unlike | 
 
 
 
 
 | 33 | Integer.  Even if there is a 32-bit Cardinal type, there is no | 
 
 
 
 
 | 34 | real need for unsigned int in zlib under a 32-bit environment. | 
 
 
 
 
 | 35 |  | 
 
 
 
 
 | 36 | - Except for the callbacks, the zlib function interfaces are | 
 
 
 
 
 | 37 | assuming the calling convention normally used in Pascal | 
 
 
 
 
 | 38 | (__pascal for DOS and Windows16, __fastcall for Windows32). | 
 
 
 
 
 | 39 | Since the cdecl keyword is used, the old Turbo Pascal does | 
 
 
 
 
 | 40 | not work with this interface. | 
 
 
 
 
 | 41 |  | 
 
 
 
 
 | 42 | - The gz* function interfaces are not translated, to avoid | 
 
 
 
 
 | 43 | interfacing problems with the C runtime library.  Besides, | 
 
 
 
 
 | 44 | gzprintf(gzFile file, const char *format, ...) | 
 
 
 
 
 | 45 | cannot be translated into Pascal. | 
 
 
 
 
 | 46 |  | 
 
 
 
 
 | 47 |  | 
 
 
 
 
 | 48 | Legal issues | 
 
 
 
 
 | 49 | ============ | 
 
 
 
 
 | 50 |  | 
 
 
 
 
 | 51 | The zlibpas interface is: | 
 
 
 
 
 | 52 | Copyright (C) 1995-2003 Jean-loup Gailly and Mark Adler. | 
 
 
 
 
 | 53 | Copyright (C) 1998 by Bob Dellaca. | 
 
 
 
 
 | 54 | Copyright (C) 2003 by Cosmin Truta. | 
 
 
 
 
 | 55 |  | 
 
 
 
 
 | 56 | The example program is: | 
 
 
 
 
 | 57 | Copyright (C) 1995-2003 by Jean-loup Gailly. | 
 
 
 
 
 | 58 | Copyright (C) 1998,1999,2000 by Jacques Nomssi Nzali. | 
 
 
 
 
 | 59 | Copyright (C) 2003 by Cosmin Truta. | 
 
 
 
 
 | 60 |  | 
 
 
 
 
 | 61 | This software is provided 'as-is', without any express or implied | 
 
 
 
 
 | 62 | warranty.  In no event will the author be held liable for any damages | 
 
 
 
 
 | 63 | arising from the use of this software. | 
 
 
 
 
 | 64 |  | 
 
 
 
 
 | 65 | Permission is granted to anyone to use this software for any purpose, | 
 
 
 
 
 | 66 | including commercial applications, and to alter it and redistribute it | 
 
 
 
 
 | 67 | freely, subject to the following restrictions: | 
 
 
 
 
 | 68 |  | 
 
 
 
 
 | 69 | 1. The origin of this software must not be misrepresented; you must not | 
 
 
 
 
 | 70 | claim that you wrote the original software. If you use this software | 
 
 
 
 
 | 71 | in a product, an acknowledgment in the product documentation would be | 
 
 
 
 
 | 72 | appreciated but is not required. | 
 
 
 
 
 | 73 | 2. Altered source versions must be plainly marked as such, and must not be | 
 
 
 
 
 | 74 | misrepresented as being the original software. | 
 
 
 
 
 | 75 | 3. This notice may not be removed or altered from any source distribution. | 
 
 
 
 
 | 76 |  |