Fossil

Hex Artifact Content
Login

Hex Artifact Content

Artifact c47cc3ccdb450bd0d3d1d0e6f52746a2c0ca8541:


0000: 0a 54 68 69 73 20 64 69 72 65 63 74 6f 72 79 20  .This directory 
0010: 63 6f 6e 74 61 69 6e 73 20 61 20 50 61 73 63 61  contains a Pasca
0020: 6c 20 28 44 65 6c 70 68 69 2c 20 4b 79 6c 69 78  l (Delphi, Kylix
0030: 29 20 69 6e 74 65 72 66 61 63 65 20 74 6f 20 74  ) interface to t
0040: 68 65 0a 7a 6c 69 62 20 64 61 74 61 20 63 6f 6d  he.zlib data com
0050: 70 72 65 73 73 69 6f 6e 20 6c 69 62 72 61 72 79  pression library
0060: 2e 0a 0a 0a 44 69 72 65 63 74 6f 72 79 20 6c 69  ....Directory li
0070: 73 74 69 6e 67 0a 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d  sting.==========
0080: 3d 3d 3d 3d 3d 3d 3d 0a 0a 7a 6c 69 62 64 33 32  =======..zlibd32
0090: 2e 6d 61 6b 20 20 20 20 20 6d 61 6b 65 66 69 6c  .mak     makefil
00a0: 65 20 66 6f 72 20 42 6f 72 6c 61 6e 64 20 43 2b  e for Borland C+
00b0: 2b 0a 65 78 61 6d 70 6c 65 2e 70 61 73 20 20 20  +.example.pas   
00c0: 20 20 75 73 61 67 65 20 65 78 61 6d 70 6c 65 20    usage example 
00d0: 6f 66 20 7a 6c 69 62 0a 7a 6c 69 62 70 61 73 2e  of zlib.zlibpas.
00e0: 70 61 73 20 20 20 20 20 74 68 65 20 50 61 73 63  pas     the Pasc
00f0: 61 6c 20 69 6e 74 65 72 66 61 63 65 20 74 6f 20  al interface to 
0100: 7a 6c 69 62 0a 72 65 61 64 6d 65 2e 74 78 74 20  zlib.readme.txt 
0110: 20 20 20 20 20 74 68 69 73 20 66 69 6c 65 0a 0a       this file..
0120: 0a 43 6f 6d 70 61 74 69 62 69 6c 69 74 79 20 6e  .Compatibility n
0130: 6f 74 65 73 0a 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d  otes.===========
0140: 3d 3d 3d 3d 3d 3d 3d 3d 0a 0a 2d 20 41 6c 74 68  ========..- Alth
0150: 6f 75 67 68 20 74 68 65 20 6e 61 6d 65 20 22 7a  ough the name "z
0160: 6c 69 62 22 20 77 6f 75 6c 64 20 68 61 76 65 20  lib" would have 
0170: 62 65 65 6e 20 6d 6f 72 65 20 6e 6f 72 6d 61 6c  been more normal
0180: 20 66 6f 72 20 74 68 65 0a 20 20 7a 6c 69 62 70   for the.  zlibp
0190: 61 73 20 75 6e 69 74 2c 20 74 68 69 73 20 6e 61  as unit, this na
01a0: 6d 65 20 69 73 20 61 6c 72 65 61 64 79 20 74 61  me is already ta
01b0: 6b 65 6e 20 62 79 20 42 6f 72 6c 61 6e 64 27 73  ken by Borland's
01c0: 20 5a 4c 69 62 20 75 6e 69 74 2e 0a 20 20 54 68   ZLib unit..  Th
01d0: 69 73 20 69 73 20 73 6f 6d 65 68 6f 77 20 75 6e  is is somehow un
01e0: 66 6f 72 74 75 6e 61 74 65 2c 20 62 65 63 61 75  fortunate, becau
01f0: 73 65 20 74 68 61 74 20 75 6e 69 74 20 69 73 20  se that unit is 
0200: 6e 6f 74 20 61 20 67 65 6e 75 69 6e 65 0a 20 20  not a genuine.  
0210: 69 6e 74 65 72 66 61 63 65 20 74 6f 20 74 68 65  interface to the
0220: 20 66 75 6c 6c 2d 66 6c 65 64 67 65 64 20 7a 6c   full-fledged zl
0230: 69 62 20 66 75 6e 63 74 69 6f 6e 61 6c 69 74 79  ib functionality
0240: 2c 20 62 75 74 20 61 20 73 75 69 74 65 20 6f 66  , but a suite of
0250: 0a 20 20 63 6c 61 73 73 20 77 72 61 70 70 65 72  .  class wrapper
0260: 73 20 61 72 6f 75 6e 64 20 7a 6c 69 62 20 73 74  s around zlib st
0270: 72 65 61 6d 73 2e 20 20 4f 74 68 65 72 20 65 73  reams.  Other es
0280: 73 65 6e 74 69 61 6c 20 66 65 61 74 75 72 65 73  sential features
0290: 2c 0a 20 20 73 75 63 68 20 61 73 20 63 68 65 63  ,.  such as chec
02a0: 6b 73 75 6d 73 2c 20 61 72 65 20 6d 69 73 73 69  ksums, are missi
02b0: 6e 67 2e 0a 20 20 49 74 20 77 6f 75 6c 64 20 68  ng..  It would h
02c0: 61 76 65 20 62 65 65 6e 20 6d 6f 72 65 20 61 70  ave been more ap
02d0: 70 72 6f 70 72 69 61 74 65 20 66 6f 72 20 74 68  propriate for th
02e0: 61 74 20 75 6e 69 74 20 74 6f 20 68 61 76 65 20  at unit to have 
02f0: 61 20 6e 61 6d 65 0a 20 20 6c 69 6b 65 20 22 5a  a name.  like "Z
0300: 53 74 72 65 61 6d 73 22 2c 20 6f 72 20 73 6f 6d  Streams", or som
0310: 65 74 68 69 6e 67 20 73 69 6d 69 6c 61 72 2e 0a  ething similar..
0320: 0a 2d 20 54 68 65 20 43 20 61 6e 64 20 7a 6c 69  .- The C and zli
0330: 62 2d 73 75 70 70 6c 69 65 64 20 74 79 70 65 73  b-supplied types
0340: 20 69 6e 74 2c 20 75 49 6e 74 2c 20 6c 6f 6e 67   int, uInt, long
0350: 2c 20 75 4c 6f 6e 67 2c 20 65 74 63 2e 20 61 72  , uLong, etc. ar
0360: 65 0a 20 20 74 72 61 6e 73 6c 61 74 65 64 20 64  e.  translated d
0370: 69 72 65 63 74 6c 79 20 69 6e 74 6f 20 50 61 73  irectly into Pas
0380: 63 61 6c 20 74 79 70 65 73 20 6f 66 20 73 69 6d  cal types of sim
0390: 69 6c 61 72 20 73 69 7a 65 73 20 28 49 6e 74 65  ilar sizes (Inte
03a0: 67 65 72 2c 0a 20 20 4c 6f 6e 67 49 6e 74 2c 20  ger,.  LongInt, 
03b0: 65 74 63 2e 29 2c 20 74 6f 20 61 76 6f 69 64 20  etc.), to avoid 
03c0: 6e 61 6d 65 73 70 61 63 65 20 70 6f 6c 6c 75 74  namespace pollut
03d0: 69 6f 6e 2e 20 20 49 6e 20 70 61 72 74 69 63 75  ion.  In particu
03e0: 6c 61 72 2c 0a 20 20 74 68 65 72 65 20 69 73 20  lar,.  there is 
03f0: 6e 6f 20 63 6f 6e 76 65 72 73 69 6f 6e 20 6f 66  no conversion of
0400: 20 75 6e 73 69 67 6e 65 64 20 69 6e 74 20 69 6e   unsigned int in
0410: 74 6f 20 61 20 50 61 73 63 61 6c 20 75 6e 73 69  to a Pascal unsi
0420: 67 6e 65 64 0a 20 20 69 6e 74 65 67 65 72 2e 20  gned.  integer. 
0430: 20 54 68 65 20 57 6f 72 64 20 74 79 70 65 20 69   The Word type i
0440: 73 20 6e 6f 6e 2d 70 6f 72 74 61 62 6c 65 20 61  s non-portable a
0450: 6e 64 20 68 61 73 20 74 68 65 20 73 61 6d 65 20  nd has the same 
0460: 73 69 7a 65 0a 20 20 28 31 36 20 62 69 74 73 29  size.  (16 bits)
0470: 20 62 6f 74 68 20 69 6e 20 61 20 31 36 2d 62 69   both in a 16-bi
0480: 74 20 61 6e 64 20 69 6e 20 61 20 33 32 2d 62 69  t and in a 32-bi
0490: 74 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 2c 20 75  t environment, u
04a0: 6e 6c 69 6b 65 0a 20 20 49 6e 74 65 67 65 72 2e  nlike.  Integer.
04b0: 20 20 45 76 65 6e 20 69 66 20 74 68 65 72 65 20    Even if there 
04c0: 69 73 20 61 20 33 32 2d 62 69 74 20 43 61 72 64  is a 32-bit Card
04d0: 69 6e 61 6c 20 74 79 70 65 2c 20 74 68 65 72 65  inal type, there
04e0: 20 69 73 20 6e 6f 0a 20 20 72 65 61 6c 20 6e 65   is no.  real ne
04f0: 65 64 20 66 6f 72 20 75 6e 73 69 67 6e 65 64 20  ed for unsigned 
0500: 69 6e 74 20 69 6e 20 7a 6c 69 62 20 75 6e 64 65  int in zlib unde
0510: 72 20 61 20 33 32 2d 62 69 74 20 65 6e 76 69 72  r a 32-bit envir
0520: 6f 6e 6d 65 6e 74 2e 0a 0a 2d 20 45 78 63 65 70  onment...- Excep
0530: 74 20 66 6f 72 20 74 68 65 20 63 61 6c 6c 62 61  t for the callba
0540: 63 6b 73 2c 20 74 68 65 20 7a 6c 69 62 20 66 75  cks, the zlib fu
0550: 6e 63 74 69 6f 6e 20 69 6e 74 65 72 66 61 63 65  nction interface
0560: 73 20 61 72 65 0a 20 20 61 73 73 75 6d 69 6e 67  s are.  assuming
0570: 20 74 68 65 20 63 61 6c 6c 69 6e 67 20 63 6f 6e   the calling con
0580: 76 65 6e 74 69 6f 6e 20 6e 6f 72 6d 61 6c 6c 79  vention normally
0590: 20 75 73 65 64 20 69 6e 20 50 61 73 63 61 6c 0a   used in Pascal.
05a0: 20 20 28 5f 5f 70 61 73 63 61 6c 20 66 6f 72 20    (__pascal for 
05b0: 44 4f 53 20 61 6e 64 20 57 69 6e 64 6f 77 73 31  DOS and Windows1
05c0: 36 2c 20 5f 5f 66 61 73 74 63 61 6c 6c 20 66 6f  6, __fastcall fo
05d0: 72 20 57 69 6e 64 6f 77 73 33 32 29 2e 0a 20 20  r Windows32)..  
05e0: 53 69 6e 63 65 20 74 68 65 20 63 64 65 63 6c 20  Since the cdecl 
05f0: 6b 65 79 77 6f 72 64 20 69 73 20 75 73 65 64 2c  keyword is used,
0600: 20 74 68 65 20 6f 6c 64 20 54 75 72 62 6f 20 50   the old Turbo P
0610: 61 73 63 61 6c 20 64 6f 65 73 0a 20 20 6e 6f 74  ascal does.  not
0620: 20 77 6f 72 6b 20 77 69 74 68 20 74 68 69 73 20   work with this 
0630: 69 6e 74 65 72 66 61 63 65 2e 0a 0a 2d 20 54 68  interface...- Th
0640: 65 20 67 7a 2a 20 66 75 6e 63 74 69 6f 6e 20 69  e gz* function i
0650: 6e 74 65 72 66 61 63 65 73 20 61 72 65 20 6e 6f  nterfaces are no
0660: 74 20 74 72 61 6e 73 6c 61 74 65 64 2c 20 74 6f  t translated, to
0670: 20 61 76 6f 69 64 0a 20 20 69 6e 74 65 72 66 61   avoid.  interfa
0680: 63 69 6e 67 20 70 72 6f 62 6c 65 6d 73 20 77 69  cing problems wi
0690: 74 68 20 74 68 65 20 43 20 72 75 6e 74 69 6d 65  th the C runtime
06a0: 20 6c 69 62 72 61 72 79 2e 20 20 42 65 73 69 64   library.  Besid
06b0: 65 73 2c 0a 20 20 20 20 67 7a 70 72 69 6e 74 66  es,.    gzprintf
06c0: 28 67 7a 46 69 6c 65 20 66 69 6c 65 2c 20 63 6f  (gzFile file, co
06d0: 6e 73 74 20 63 68 61 72 20 2a 66 6f 72 6d 61 74  nst char *format
06e0: 2c 20 2e 2e 2e 29 0a 20 20 63 61 6e 6e 6f 74 20  , ...).  cannot 
06f0: 62 65 20 74 72 61 6e 73 6c 61 74 65 64 20 69 6e  be translated in
0700: 74 6f 20 50 61 73 63 61 6c 2e 0a 0a 0a 4c 65 67  to Pascal....Leg
0710: 61 6c 20 69 73 73 75 65 73 0a 3d 3d 3d 3d 3d 3d  al issues.======
0720: 3d 3d 3d 3d 3d 3d 0a 0a 54 68 65 20 7a 6c 69 62  ======..The zlib
0730: 70 61 73 20 69 6e 74 65 72 66 61 63 65 20 69 73  pas interface is
0740: 3a 0a 20 20 43 6f 70 79 72 69 67 68 74 20 28 43  :.  Copyright (C
0750: 29 20 31 39 39 35 2d 32 30 30 33 20 4a 65 61 6e  ) 1995-2003 Jean
0760: 2d 6c 6f 75 70 20 47 61 69 6c 6c 79 20 61 6e 64  -loup Gailly and
0770: 20 4d 61 72 6b 20 41 64 6c 65 72 2e 0a 20 20 43   Mark Adler..  C
0780: 6f 70 79 72 69 67 68 74 20 28 43 29 20 31 39 39  opyright (C) 199
0790: 38 20 62 79 20 42 6f 62 20 44 65 6c 6c 61 63 61  8 by Bob Dellaca
07a0: 2e 0a 20 20 43 6f 70 79 72 69 67 68 74 20 28 43  ..  Copyright (C
07b0: 29 20 32 30 30 33 20 62 79 20 43 6f 73 6d 69 6e  ) 2003 by Cosmin
07c0: 20 54 72 75 74 61 2e 0a 0a 54 68 65 20 65 78 61   Truta...The exa
07d0: 6d 70 6c 65 20 70 72 6f 67 72 61 6d 20 69 73 3a  mple program is:
07e0: 0a 20 20 43 6f 70 79 72 69 67 68 74 20 28 43 29  .  Copyright (C)
07f0: 20 31 39 39 35 2d 32 30 30 33 20 62 79 20 4a 65   1995-2003 by Je
0800: 61 6e 2d 6c 6f 75 70 20 47 61 69 6c 6c 79 2e 0a  an-loup Gailly..
0810: 20 20 43 6f 70 79 72 69 67 68 74 20 28 43 29 20    Copyright (C) 
0820: 31 39 39 38 2c 31 39 39 39 2c 32 30 30 30 20 62  1998,1999,2000 b
0830: 79 20 4a 61 63 71 75 65 73 20 4e 6f 6d 73 73 69  y Jacques Nomssi
0840: 20 4e 7a 61 6c 69 2e 0a 20 20 43 6f 70 79 72 69   Nzali..  Copyri
0850: 67 68 74 20 28 43 29 20 32 30 30 33 20 62 79 20  ght (C) 2003 by 
0860: 43 6f 73 6d 69 6e 20 54 72 75 74 61 2e 0a 0a 20  Cosmin Truta... 
0870: 20 54 68 69 73 20 73 6f 66 74 77 61 72 65 20 69   This software i
0880: 73 20 70 72 6f 76 69 64 65 64 20 27 61 73 2d 69  s provided 'as-i
0890: 73 27 2c 20 77 69 74 68 6f 75 74 20 61 6e 79 20  s', without any 
08a0: 65 78 70 72 65 73 73 20 6f 72 20 69 6d 70 6c 69  express or impli
08b0: 65 64 0a 20 20 77 61 72 72 61 6e 74 79 2e 20 20  ed.  warranty.  
08c0: 49 6e 20 6e 6f 20 65 76 65 6e 74 20 77 69 6c 6c  In no event will
08d0: 20 74 68 65 20 61 75 74 68 6f 72 20 62 65 20 68   the author be h
08e0: 65 6c 64 20 6c 69 61 62 6c 65 20 66 6f 72 20 61  eld liable for a
08f0: 6e 79 20 64 61 6d 61 67 65 73 0a 20 20 61 72 69  ny damages.  ari
0900: 73 69 6e 67 20 66 72 6f 6d 20 74 68 65 20 75 73  sing from the us
0910: 65 20 6f 66 20 74 68 69 73 20 73 6f 66 74 77 61  e of this softwa
0920: 72 65 2e 0a 0a 20 20 50 65 72 6d 69 73 73 69 6f  re...  Permissio
0930: 6e 20 69 73 20 67 72 61 6e 74 65 64 20 74 6f 20  n is granted to 
0940: 61 6e 79 6f 6e 65 20 74 6f 20 75 73 65 20 74 68  anyone to use th
0950: 69 73 20 73 6f 66 74 77 61 72 65 20 66 6f 72 20  is software for 
0960: 61 6e 79 20 70 75 72 70 6f 73 65 2c 0a 20 20 69  any purpose,.  i
0970: 6e 63 6c 75 64 69 6e 67 20 63 6f 6d 6d 65 72 63  ncluding commerc
0980: 69 61 6c 20 61 70 70 6c 69 63 61 74 69 6f 6e 73  ial applications
0990: 2c 20 61 6e 64 20 74 6f 20 61 6c 74 65 72 20 69  , and to alter i
09a0: 74 20 61 6e 64 20 72 65 64 69 73 74 72 69 62 75  t and redistribu
09b0: 74 65 20 69 74 0a 20 20 66 72 65 65 6c 79 2c 20  te it.  freely, 
09c0: 73 75 62 6a 65 63 74 20 74 6f 20 74 68 65 20 66  subject to the f
09d0: 6f 6c 6c 6f 77 69 6e 67 20 72 65 73 74 72 69 63  ollowing restric
09e0: 74 69 6f 6e 73 3a 0a 0a 20 20 31 2e 20 54 68 65  tions:..  1. The
09f0: 20 6f 72 69 67 69 6e 20 6f 66 20 74 68 69 73 20   origin of this 
0a00: 73 6f 66 74 77 61 72 65 20 6d 75 73 74 20 6e 6f  software must no
0a10: 74 20 62 65 20 6d 69 73 72 65 70 72 65 73 65 6e  t be misrepresen
0a20: 74 65 64 3b 20 79 6f 75 20 6d 75 73 74 20 6e 6f  ted; you must no
0a30: 74 0a 20 20 20 20 20 63 6c 61 69 6d 20 74 68 61  t.     claim tha
0a40: 74 20 79 6f 75 20 77 72 6f 74 65 20 74 68 65 20  t you wrote the 
0a50: 6f 72 69 67 69 6e 61 6c 20 73 6f 66 74 77 61 72  original softwar
0a60: 65 2e 20 49 66 20 79 6f 75 20 75 73 65 20 74 68  e. If you use th
0a70: 69 73 20 73 6f 66 74 77 61 72 65 0a 20 20 20 20  is software.    
0a80: 20 69 6e 20 61 20 70 72 6f 64 75 63 74 2c 20 61   in a product, a
0a90: 6e 20 61 63 6b 6e 6f 77 6c 65 64 67 6d 65 6e 74  n acknowledgment
0aa0: 20 69 6e 20 74 68 65 20 70 72 6f 64 75 63 74 20   in the product 
0ab0: 64 6f 63 75 6d 65 6e 74 61 74 69 6f 6e 20 77 6f  documentation wo
0ac0: 75 6c 64 20 62 65 0a 20 20 20 20 20 61 70 70 72  uld be.     appr
0ad0: 65 63 69 61 74 65 64 20 62 75 74 20 69 73 20 6e  eciated but is n
0ae0: 6f 74 20 72 65 71 75 69 72 65 64 2e 0a 20 20 32  ot required..  2
0af0: 2e 20 41 6c 74 65 72 65 64 20 73 6f 75 72 63 65  . Altered source
0b00: 20 76 65 72 73 69 6f 6e 73 20 6d 75 73 74 20 62   versions must b
0b10: 65 20 70 6c 61 69 6e 6c 79 20 6d 61 72 6b 65 64  e plainly marked
0b20: 20 61 73 20 73 75 63 68 2c 20 61 6e 64 20 6d 75   as such, and mu
0b30: 73 74 20 6e 6f 74 20 62 65 0a 20 20 20 20 20 6d  st not be.     m
0b40: 69 73 72 65 70 72 65 73 65 6e 74 65 64 20 61 73  isrepresented as
0b50: 20 62 65 69 6e 67 20 74 68 65 20 6f 72 69 67 69   being the origi
0b60: 6e 61 6c 20 73 6f 66 74 77 61 72 65 2e 0a 20 20  nal software..  
0b70: 33 2e 20 54 68 69 73 20 6e 6f 74 69 63 65 20 6d  3. This notice m
0b80: 61 79 20 6e 6f 74 20 62 65 20 72 65 6d 6f 76 65  ay not be remove
0b90: 64 20 6f 72 20 61 6c 74 65 72 65 64 20 66 72 6f  d or altered fro
0ba0: 6d 20 61 6e 79 20 73 6f 75 72 63 65 20 64 69 73  m any source dis
0bb0: 74 72 69 62 75 74 69 6f 6e 2e 0a 0a              tribution...