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