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