readme.txt 2.4 KB

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