Home | History | Annotate | Line # | Download | only in delphi
      1  1.1  christos 
      2  1.1  christos Overview
      3  1.1  christos ========
      4  1.1  christos 
      5  1.1  christos This directory contains an update to the ZLib interface unit,
      6  1.1  christos distributed by Borland as a Delphi supplemental component.
      7  1.1  christos 
      8  1.1  christos The original ZLib unit is Copyright (c) 1997,99 Borland Corp.,
      9  1.1  christos and is based on zlib version 1.0.4.  There are a series of bugs
     10  1.1  christos and security problems associated with that old zlib version, and
     11  1.1  christos we recommend the users to update their ZLib unit.
     12  1.1  christos 
     13  1.1  christos 
     14  1.1  christos Summary of modifications
     15  1.1  christos ========================
     16  1.1  christos 
     17  1.1  christos - Improved makefile, adapted to zlib version 1.2.1.
     18  1.1  christos 
     19  1.1  christos - Some field types from TZStreamRec are changed from Integer to
     20  1.1  christos   Longint, for consistency with the zlib.h header, and for 64-bit
     21  1.1  christos   readiness.
     22  1.1  christos 
     23  1.1  christos - The zlib_version constant is updated.
     24  1.1  christos 
     25  1.1  christos - The new Z_RLE strategy has its corresponding symbolic constant.
     26  1.1  christos 
     27  1.1  christos - The allocation and deallocation functions and function types
     28  1.1  christos   (TAlloc, TFree, zlibAllocMem and zlibFreeMem) are now cdecl,
     29  1.1  christos   and _malloc and _free are added as C RTL stubs.  As a result,
     30  1.1  christos   the original C sources of zlib can be compiled out of the box,
     31  1.1  christos   and linked to the ZLib unit.
     32  1.1  christos 
     33  1.1  christos 
     34  1.1  christos Suggestions for improvements
     35  1.1  christos ============================
     36  1.1  christos 
     37  1.1  christos Currently, the ZLib unit provides only a limited wrapper around
     38  1.1  christos the zlib library, and much of the original zlib functionality is
     39  1.1  christos missing.  Handling compressed file formats like ZIP/GZIP or PNG
     40  1.1  christos cannot be implemented without having this functionality.
     41  1.1  christos Applications that handle these formats are either using their own,
     42  1.1  christos duplicated code, or not using the ZLib unit at all.
     43  1.1  christos 
     44  1.1  christos Here are a few suggestions:
     45  1.1  christos 
     46  1.1  christos - Checksum class wrappers around adler32() and crc32(), similar
     47  1.1  christos   to the Java classes that implement the java.util.zip.Checksum
     48  1.1  christos   interface.
     49  1.1  christos 
     50  1.1  christos - The ability to read and write raw deflate streams, without the
     51  1.1  christos   zlib stream header and trailer.  Raw deflate streams are used
     52  1.1  christos   in the ZIP file format.
     53  1.1  christos 
     54  1.1  christos - The ability to read and write gzip streams, used in the GZIP
     55  1.1  christos   file format, and normally produced by the gzip program.
     56  1.1  christos 
     57  1.1  christos - The ability to select a different compression strategy, useful
     58  1.1  christos   to PNG and MNG image compression, and to multimedia compression
     59  1.1  christos   in general.  Besides the compression level
     60  1.1  christos 
     61  1.1  christos     TCompressionLevel = (clNone, clFastest, clDefault, clMax);
     62  1.1  christos 
     63  1.1  christos   which, in fact, could have used the 'z' prefix and avoided
     64  1.1  christos   TColor-like symbols
     65  1.1  christos 
     66  1.1  christos     TCompressionLevel = (zcNone, zcFastest, zcDefault, zcMax);
     67  1.1  christos 
     68  1.1  christos   there could be a compression strategy
     69  1.1  christos 
     70  1.1  christos     TCompressionStrategy = (zsDefault, zsFiltered, zsHuffmanOnly, zsRle);
     71  1.1  christos 
     72  1.1  christos - ZIP and GZIP stream handling via TStreams.
     73  1.1  christos 
     74  1.1  christos 
     75  1.1  christos --
     76  1.1  christos Cosmin Truta <cosmint (a] cs.ubbcluj.ro>
     77