README.DOS 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. README.DOS
  2. Some notes about the supplied MSDOS executables and their compilers:
  3. A) The 32-bit DOS executables "zip.exe" and the auxilary utilities
  4. "zipnote.exe", "zipsplit.exe", "zipcloak.exe" (crypt-enabled distribution
  5. only) were compiled with DJGPP v 2.03, using gcc 2.95.3 as compiler.
  6. They require a DPMI server to run, e.g.: a DOS command prompt window
  7. under WINDOWS 3.x or Windows 9x. To use this program under plain DOS,
  8. you should install the free (GPL'ed) DPMI server CWSDPMI.EXE. Look
  9. for "csdpmi5b.zip" under "simtelnet/gnu/djgpp/v2misc/" on the SimTelNet
  10. home site "ftp.cdrom.com" or any mirror site of the SimtelNet archive.
  11. We have decided to provide 32-bit rather than 16-bit executables of
  12. the auxilary tools for the following reasons:
  13. - Nowadays, it has become quite unlikely to find PC computers "in action"
  14. that do not at least have an i386 CPU.
  15. - the 32-bit versions do not impose additional archive handling limits
  16. beyond those defined by the Zip archive format
  17. - the 32-bit DJGPP executables can handle long filenames on systems running
  18. Windows 95/98/Me and Windows 2K/XP.
  19. B) There are two 16-bit MSDOS executables provided in zcr2?x.zip:
  20. zip16.exe regular Zip program, requires ca. 455 KBytes of contiguous
  21. free DOS memory or more.
  22. zip16-sm.exe a variant that was compiled with the SMALL_MEM option
  23. for minimal memory consumption; requires at minimum
  24. 322 KBytes of contiguous free DOS memory.
  25. The SMALL_MEM variant requires much less space for the compression
  26. buffers, but at the cost of some compression efficiency.
  27. Therefore, we recommend to use the "SMALL_MEM" 16-bit "zip16-sm.exe" only
  28. in case of "out of memory" problems (DOS memory is low and/or very large
  29. number of archive entries), when the 32-bit program cannot be used for
  30. some reason (286 or older; no DPMI server; ...).
  31. C) Hard limits of the Zip archive format:
  32. Number of entries in Zip archive: 64 k (2^16 - 1 entries)
  33. Compressed size of archive entry: 4 GByte (2^32 - 1 Bytes)
  34. Uncompressed size of entry: 4 GByte (2^32 - 1 Bytes)
  35. Size of single-volume Zip archive: 4 GByte (2^32 - 1 Bytes)
  36. Per-volume size of multi-volume archives: 4 GByte (2^32 - 1 Bytes)
  37. Number of parts for multi-volume archives: 64 k (1^16 - 1 parts)
  38. Total size of multi-volume archive: 256 TByte (4G * 64k)
  39. The number of archive entries and of multivolume parts are limited by
  40. the structure of the "end-of-central-directory" record, where the these
  41. numbers are stored in 2-Byte fields.
  42. Some Zip and/or UnZip implementations (for example Info-ZIP's) allow
  43. handling of archives with more than 64k entries. (The information
  44. from "number of entries" field in the "end-of-central-directory" record
  45. is not really neccessary to retrieve the contents of a Zip archive;
  46. it should rather be used for consistency checks.)
  47. Length of an archive entry name: 64 kByte (2^16 - 1)
  48. Length of archive member comment: 64 kByte (2^16 - 1)
  49. Total length of "extra field": 64 kByte (2^16 - 1)
  50. Length of a single e.f. block: 64 kByte (2^16 - 1)
  51. Length of archive comment: 64 KByte (2^16 - 1)
  52. Additional limitation claimed by PKWARE:
  53. Size of local-header structure (fixed fields of 30 Bytes + filename
  54. local extra field): < 64 kByte
  55. Size of central-directory structure (46 Bytes + filename +
  56. central extra field + member comment): < 64 kByte
  57. D) Implementation limits of the Zip executables:
  58. 1. Size limits caused by file I/O and compression handling:
  59. Size of Zip archive: 2 GByte (2^31 - 1 Bytes)
  60. Compressed size of archive entry: 2 GByte (2^31 - 1 Bytes)
  61. Uncompressed size of entry: 2 GByte (2^31 - 1 Bytes),
  62. (could/should be 4 GBytes...)
  63. Multi-volume archive creation is not supported.
  64. 2. Limits caused by handling of archive contents lists
  65. 2.1. Number of archive entries (freshen, update, delete)
  66. a) 16-bit executable: 64k (2^16 -1) or 32k (2^15 - 1),
  67. (unsigned vs. signed type of size_t)
  68. a1) 16-bit executable: <16k ((2^16)/4)
  69. (The smaller limit a1) results from the array size limit of
  70. the "qsort()" function.)
  71. 32-bit executables <1G ((2^32)/4)
  72. (usual system limit of the "qsort()" function on 32-bit systems)
  73. b) stack space needed by qsort to sort list of archive entries
  74. NOTE: In the current executables, overflows of limits a) and b) are NOT
  75. checked!
  76. c) amount of free memory to hold "central directory information" of
  77. all archive entries; one entry needs:
  78. 96 bytes (32-bit) resp. 80 bytes (16-bit)
  79. + 3 * length of entry name
  80. + length of zip entry comment (when present)
  81. + length of extra field(s) (when present, e.g.: UT needs 9 bytes)
  82. + some bytes for book-keeping of memory allocation
  83. Conclusion:
  84. For systems with limited memory space (MSDOS, small AMIGAs, other
  85. environments without virtual memory), the number of archive entries
  86. is most often limited by condition c).
  87. For example, with approx. 100 kBytes of free memory after loading and
  88. initializing the program, a 16-bit DOS Zip cannot process more than 600
  89. to 1000 (+) archive entries. (For the 16-bit Windows DLL or the 16-bit
  90. OS/2 port, limit c) is less important because Windows or OS/2 executables
  91. are not restricted to the 1024k area of real mode memory. These 16-bit
  92. ports are limited by conditions a1) and b), say: at maximum approx.
  93. 16000 entries!)
  94. 2.2. Number of "new" entries (add operation)
  95. In addition to the restrictions above (2.1.), the following limits
  96. caused by the handling of the "new files" list apply:
  97. a) 16-bit executable: <16k ((2^64)/4)
  98. b) stack size required for "qsort" operation on "new entries" list.
  99. NOTE: In the current executables, the overflow checks for these limits
  100. are missing!
  101. c) amount of free memory to hold the directory info list for new entries;
  102. one entry needs:
  103. 24 bytes (32-bit) resp. 22 bytes (16-bit)
  104. + 3 * length of filename
  105. Please report any problems to: Zip-Bugs@lists.wku.edu
  106. Last updated: 07 July 2001