readme.txt 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225
  1. Contents:
  2. zipper.pp/TZipper
  3. - Introduction
  4. - Zip standards compliance
  5. - Zip file format
  6. - Zip64 support notes
  7. paszlib
  8. - Introduction
  9. - Change Log
  10. - File list
  11. - Legal issues
  12. - Archive Locations
  13. =================
  14. zipper.pp/TZipper
  15. =================
  16. Introduction
  17. ============
  18. Zipper.pp contains TZipper, an object-oriented wrapper for the paszlib units
  19. that allows
  20. - compressing/adding files/streams
  21. - decompressing files/streams
  22. - listing files
  23. contained in a zip file.
  24. Zip standards compliance
  25. ========================
  26. TZipper is meant to help implement the most widely used and useful aspects of
  27. the zip format, while following the official specifications
  28. http://www.pkware.com/documents/casestudies/APPNOTE.TXT
  29. (latest version reviewed for this readme: 6.3.3, September 1, 2012)
  30. as much as possible.
  31. Not all (de)compression methods specified in the zip standard [1] are supported.
  32. Encryption (either zip 2.0 or AES) is not supported, nor are multiple disk sets (spanning/splitting).
  33. Please see the fpdoc help and the zipper.pp for details on using the class.
  34. Zip file format
  35. ===============
  36. The standard mentioned above documents the zip file format authoratively
  37. and in detail. However, a brief summary can be useful:
  38. A zip file consists of
  39. For each file:
  40. local file header
  41. (filename, uncompressed,compressed size etc)
  42. optional extended file header
  43. (e.g. zip64 extended info which overrides size above)
  44. compressed file data
  45. Central directory:
  46. - for each file:
  47. central directory header
  48. (much the same data as local file header+position of local file header)
  49. optional extended file header (e.g. zip64 extended info which overrides the
  50. above)
  51. if zip64 is used: one
  52. zip64 end of central directory record
  53. (mainly used to point to beginning of central directory)
  54. zip64 end of central directory locator
  55. (mainly used to point to zip64 end of central directory record)
  56. in any case: one
  57. end of central directory record
  58. (contains position of central directory, zip file comment etc)
  59. Zip64 support notes
  60. ===================
  61. The zip64 extensions that allow large files are supported:
  62. - total zip file size and uncompressed sizes of >4Gb (up to FPC's limit of int64
  63. size for streams)
  64. - > 65535 files per zip archive (up to FPC's limit of integer due to
  65. collection.count)
  66. Write support:
  67. zip64 headers are added after local file headers only if the uncompressed or
  68. compressed sizes overflow the local file header space. This avoids wasting space.
  69. Each local zip64 file header variable overrides its corresponding variable in
  70. the local file header only if it is not 0. If it is, the local version is used.
  71. Each central directory zip64 file header variable overrides its corresponding
  72. variable in the central directory file header only if it is not 0. If it is, the
  73. central directory file header version is used.
  74. If zip64 support is needed due to zip64 local/central file headers and/or the
  75. number of files in the zip file, the zip64 alternatives to the end of central
  76. diretory variables are always written. Although the zip standard doesn't seem to
  77. require this explicitly, it doesn't forbid it either and other utilities such as
  78. rar and Windows 7 built in zip support seem to require it.
  79. =======
  80. paszlib
  81. =======
  82. _____________________________________________________________________________
  83. PASZLIB 1.0 May 11th, 1998
  84. Based on the zlib 1.1.2, a general purpose data compression library.
  85. Copyright (C) 1998,1999,2000 by NOMSSI NZALI Jacques H. C.
  86. [kn&n DES] See "Legal issues" for conditions of distribution and use.
  87. _____________________________________________________________________________
  88. Introduction
  89. ============
  90. The 'zlib' compression library provides in-memory compression and
  91. decompression functions, including integrity checks of the uncompressed
  92. data. This version of the library supports only one compression method
  93. (deflation) but other algorithms will be added later and will have the same
  94. stream interface.
  95. Compression can be done in a single step if the buffers are large
  96. enough (for example if an input file is mmap'ed), or can be done by
  97. repeated calls of the compression function. In the latter case, the
  98. application must provide more input and/or consume the output
  99. (providing more output space) before each call.
  100. The default memory requirements for deflate are 256K plus a few kilobytes
  101. for small objects. The default memory requirements for inflate are 32K
  102. plus a few kilobytes for small objects.
  103. Change Log
  104. ==========
  105. March 24th 2000 - minizip code by Gilles Vollant ported to Pascal.
  106. z_stream.msg defined as string[255] to avoid problems
  107. with Delphi 2+ dynamic string handling.
  108. changes to silence Delphi 5 compiler warning. If you
  109. have Delphi 5, defines Delphi5 in zconf.inc
  110. May 7th 1999 - Some changes for FPC
  111. deflateCopy() has new parameters
  112. trees.pas - record constant definition
  113. June 17th 1998 - Applied official 1.1.2 patch.
  114. Memcheck turned off by default.
  115. zutil.pas patch for Delphi 1 memory allocation corrected.
  116. dzlib.txt file added.
  117. compress2() is now exported
  118. June 25th 1998 - fixed a conversion bug: in inftrees.pas, ZFREE(z, v) was
  119. missing in line 574;
  120. File list
  121. =========
  122. Here is a road map to the files in the Paszlib distribution.
  123. readme.txt Introduction, Documentation
  124. dzlib.txt Changes to Delphi sources for Paszlib stream classes
  125. include file
  126. zconf.inc Configuration declarations.
  127. Pascal source code files:
  128. adler.pas compute the Adler-32 checksum of a data stream
  129. crc.pas compute the CRC-32 of a data stream
  130. gzio.pas IO on .gz files
  131. infblock.pas interpret and process block types to last block
  132. infcodes.pas process literals and length/distance pairs
  133. inffast.pas process literals and length/distance pairs fast
  134. inftrees.pas generate Huffman trees for efficient decoding
  135. infutil.pas types and macros common to blocks and codes
  136. strutils.pas string utilities
  137. trees.pas output deflated data using Huffman coding
  138. zcompres.pas compress a memory buffer
  139. zdeflate.pas compress data using the deflation algorithm
  140. zinflate.pas zlib interface to inflate modules
  141. zlib.pas zlib data structures. read the comments there!
  142. zuncompr.pas decompress a memory buffer
  143. zutil.pas
  144. minizip/ziputils.pas data structure and IO on .zip file
  145. minizip/unzip.pas
  146. minizip/zip.pas
  147. Test applications
  148. example.pas usage example of the zlib compression library
  149. minigzip.pas simulate gzip using the zlib compression library
  150. minizip/miniunz.pas simulates unzip using the zlib compression library
  151. minizip/minizip.pas simulates zip using the zlib compression library
  152. Legal issues
  153. ============
  154. Copyright (C) 1998,1999,2000 by Jacques Nomssi Nzali
  155. This software is provided 'as-is', without any express or implied
  156. warranty. In no event will the author be held liable for any damages
  157. arising from the use of this software.
  158. Permission is granted to anyone to use this software for any purpose,
  159. including commercial applications, and to alter it and redistribute it
  160. freely, subject to the following restrictions:
  161. 1. The origin of this software must not be misrepresented; you must not
  162. claim that you wrote the original software. If you use this software
  163. in a product, an acknowledgment in the product documentation would be
  164. appreciated but is not required.
  165. 2. Altered source versions must be plainly marked as such, and must not be
  166. misrepresented as being the original software.
  167. 3. This notice may not be removed or altered from any source distribution.
  168. Archive Locations:
  169. ==================
  170. Check the Paszlib home page with links
  171. http://www.tu-chemnitz.de/~nomssi/paszlib.html
  172. The data format used by the zlib library is described by RFCs (Request for
  173. Comments) 1950 to 1952 in the files ftp://ds.internic.net/rfc/rfc1950.txt
  174. (zlib format), rfc1951.txt (deflate format) and rfc1952.txt (gzip format).
  175. These documents are also available in other formats from
  176. ftp://ftp.uu.net/graphics/png/documents/zlib/zdoc-index.html.
  177. ____________________________________________________________________________
  178. Jacques Nomssi Nzali <mailto:[email protected]> March 24th, 2000