libwz 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (362) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +165 -0
  3. package/binding.gyp +149 -0
  4. package/deps/tiny-aes/.github/workflows/c-cpp.yml +27 -0
  5. package/deps/tiny-aes/CMakeLists.txt +17 -0
  6. package/deps/tiny-aes/Makefile +61 -0
  7. package/deps/tiny-aes/README.md +83 -0
  8. package/deps/tiny-aes/aes.c +572 -0
  9. package/deps/tiny-aes/aes.h +91 -0
  10. package/deps/tiny-aes/aes.hpp +12 -0
  11. package/deps/tiny-aes/conanfile.py +73 -0
  12. package/deps/tiny-aes/library.json +19 -0
  13. package/deps/tiny-aes/library.properties +11 -0
  14. package/deps/tiny-aes/test.c +316 -0
  15. package/deps/tiny-aes/test.cpp +2 -0
  16. package/deps/tiny-aes/test_package/CMakeLists.txt +11 -0
  17. package/deps/tiny-aes/test_package/conanfile.py +17 -0
  18. package/deps/tiny-aes/unlicense.txt +24 -0
  19. package/deps/zlib/.cmake-format.yaml +245 -0
  20. package/deps/zlib/.github/workflows/c-std.yml +268 -0
  21. package/deps/zlib/.github/workflows/cmake.yml +147 -0
  22. package/deps/zlib/.github/workflows/configure.yml +146 -0
  23. package/deps/zlib/.github/workflows/contribs.yml +64 -0
  24. package/deps/zlib/.github/workflows/fuzz.yml +25 -0
  25. package/deps/zlib/.github/workflows/msys-cygwin.yml +92 -0
  26. package/deps/zlib/.github/workflows/others.yml +153 -0
  27. package/deps/zlib/BUILD.bazel +134 -0
  28. package/deps/zlib/CMakeLists.txt +310 -0
  29. package/deps/zlib/ChangeLog +1669 -0
  30. package/deps/zlib/FAQ +371 -0
  31. package/deps/zlib/INDEX +67 -0
  32. package/deps/zlib/LICENSE +22 -0
  33. package/deps/zlib/MODULE.bazel +9 -0
  34. package/deps/zlib/Makefile.in +426 -0
  35. package/deps/zlib/README +115 -0
  36. package/deps/zlib/README-cmake.md +79 -0
  37. package/deps/zlib/adler32.c +164 -0
  38. package/deps/zlib/amiga/Makefile.pup +69 -0
  39. package/deps/zlib/amiga/Makefile.sas +68 -0
  40. package/deps/zlib/compress.c +99 -0
  41. package/deps/zlib/configure +1078 -0
  42. package/deps/zlib/contrib/CMakeLists.txt +61 -0
  43. package/deps/zlib/contrib/README.contrib +57 -0
  44. package/deps/zlib/contrib/ada/CMakeLists.txt +217 -0
  45. package/deps/zlib/contrib/ada/buffer_demo.adb +106 -0
  46. package/deps/zlib/contrib/ada/cmake/Modules/CMakeADACompiler.cmake.in +23 -0
  47. package/deps/zlib/contrib/ada/cmake/Modules/CMakeADAInformation.cmake +133 -0
  48. package/deps/zlib/contrib/ada/cmake/Modules/CMakeDetermineADACompiler.cmake +33 -0
  49. package/deps/zlib/contrib/ada/cmake/Modules/CMakeTestADACompiler.cmake +46 -0
  50. package/deps/zlib/contrib/ada/cmake/binder_helper.cmake +47 -0
  51. package/deps/zlib/contrib/ada/cmake/compile_helper.cmake +32 -0
  52. package/deps/zlib/contrib/ada/cmake/exe_link_helper.cmake +53 -0
  53. package/deps/zlib/contrib/ada/cmake/shared_link_helper.cmake +52 -0
  54. package/deps/zlib/contrib/ada/cmake/static_link_helper.cmake +25 -0
  55. package/deps/zlib/contrib/ada/mtest.adb +156 -0
  56. package/deps/zlib/contrib/ada/read.adb +156 -0
  57. package/deps/zlib/contrib/ada/readme.txt +65 -0
  58. package/deps/zlib/contrib/ada/test.adb +463 -0
  59. package/deps/zlib/contrib/ada/zlib-streams.adb +225 -0
  60. package/deps/zlib/contrib/ada/zlib-streams.ads +114 -0
  61. package/deps/zlib/contrib/ada/zlib-thin.adb +142 -0
  62. package/deps/zlib/contrib/ada/zlib-thin.ads +450 -0
  63. package/deps/zlib/contrib/ada/zlib.adb +701 -0
  64. package/deps/zlib/contrib/ada/zlib.ads +328 -0
  65. package/deps/zlib/contrib/ada/zlib.gpr +20 -0
  66. package/deps/zlib/contrib/blast/CMakeLists.txt +166 -0
  67. package/deps/zlib/contrib/blast/Makefile +14 -0
  68. package/deps/zlib/contrib/blast/README +4 -0
  69. package/deps/zlib/contrib/blast/blast-test.c +42 -0
  70. package/deps/zlib/contrib/blast/blast.c +422 -0
  71. package/deps/zlib/contrib/blast/blast.h +84 -0
  72. package/deps/zlib/contrib/blast/blastConfig.cmake.in +18 -0
  73. package/deps/zlib/contrib/blast/test/CMakeLists.txt +193 -0
  74. package/deps/zlib/contrib/blast/test/add_subdirectory_exclude_test.cmake.in +27 -0
  75. package/deps/zlib/contrib/blast/test/add_subdirectory_test.cmake.in +25 -0
  76. package/deps/zlib/contrib/blast/test/find_package_no_components_test.cmake.in +24 -0
  77. package/deps/zlib/contrib/blast/test/find_package_test.cmake.in +24 -0
  78. package/deps/zlib/contrib/blast/test/find_package_wrong_components_test.cmake.in +24 -0
  79. package/deps/zlib/contrib/blast/test.pk +0 -0
  80. package/deps/zlib/contrib/blast/test.txt +1 -0
  81. package/deps/zlib/contrib/blast/tester.cmake +28 -0
  82. package/deps/zlib/contrib/crc32vx/CMakeLists.txt +67 -0
  83. package/deps/zlib/contrib/crc32vx/README +9 -0
  84. package/deps/zlib/contrib/crc32vx/crc32_vx.c +254 -0
  85. package/deps/zlib/contrib/crc32vx/crc32_vx_hooks.h +9 -0
  86. package/deps/zlib/contrib/delphi/ZLib.pas +557 -0
  87. package/deps/zlib/contrib/delphi/ZLibConst.pas +11 -0
  88. package/deps/zlib/contrib/delphi/readme.txt +76 -0
  89. package/deps/zlib/contrib/delphi/zlibd32.mak +99 -0
  90. package/deps/zlib/contrib/dotzlib/DotZLib/AssemblyInfo.cs +58 -0
  91. package/deps/zlib/contrib/dotzlib/DotZLib/ChecksumImpl.cs +202 -0
  92. package/deps/zlib/contrib/dotzlib/DotZLib/CircularBuffer.cs +83 -0
  93. package/deps/zlib/contrib/dotzlib/DotZLib/CodecBase.cs +198 -0
  94. package/deps/zlib/contrib/dotzlib/DotZLib/Deflater.cs +106 -0
  95. package/deps/zlib/contrib/dotzlib/DotZLib/DotZLib.cs +288 -0
  96. package/deps/zlib/contrib/dotzlib/DotZLib/DotZLib.csproj +141 -0
  97. package/deps/zlib/contrib/dotzlib/DotZLib/GZipStream.cs +301 -0
  98. package/deps/zlib/contrib/dotzlib/DotZLib/Inflater.cs +105 -0
  99. package/deps/zlib/contrib/dotzlib/DotZLib/UnitTests.cs +274 -0
  100. package/deps/zlib/contrib/dotzlib/DotZLib.build +33 -0
  101. package/deps/zlib/contrib/dotzlib/DotZLib.chm +0 -0
  102. package/deps/zlib/contrib/dotzlib/DotZLib.sln +21 -0
  103. package/deps/zlib/contrib/dotzlib/LICENSE_1_0.txt +23 -0
  104. package/deps/zlib/contrib/dotzlib/readme.txt +58 -0
  105. package/deps/zlib/contrib/gcc_gvmat64/CMakeLists.txt +19 -0
  106. package/deps/zlib/contrib/gcc_gvmat64/gvmat64.S +570 -0
  107. package/deps/zlib/contrib/infback9/CMakeLists.txt +19 -0
  108. package/deps/zlib/contrib/infback9/README +1 -0
  109. package/deps/zlib/contrib/infback9/infback9.c +603 -0
  110. package/deps/zlib/contrib/infback9/infback9.h +37 -0
  111. package/deps/zlib/contrib/infback9/inffix9.h +107 -0
  112. package/deps/zlib/contrib/infback9/inflate9.h +47 -0
  113. package/deps/zlib/contrib/infback9/inftree9.c +319 -0
  114. package/deps/zlib/contrib/infback9/inftree9.h +61 -0
  115. package/deps/zlib/contrib/iostream/test.cpp +24 -0
  116. package/deps/zlib/contrib/iostream/zfstream.cpp +329 -0
  117. package/deps/zlib/contrib/iostream/zfstream.h +128 -0
  118. package/deps/zlib/contrib/iostream2/zstream.h +306 -0
  119. package/deps/zlib/contrib/iostream2/zstream_test.cpp +25 -0
  120. package/deps/zlib/contrib/iostream3/CMakeLists.txt +200 -0
  121. package/deps/zlib/contrib/iostream3/README +35 -0
  122. package/deps/zlib/contrib/iostream3/TODO +17 -0
  123. package/deps/zlib/contrib/iostream3/iostream3Config.cmake.in +23 -0
  124. package/deps/zlib/contrib/iostream3/test/CMakeLists.txt +191 -0
  125. package/deps/zlib/contrib/iostream3/test/add_subdirectory_exclude_test.cmake.in +27 -0
  126. package/deps/zlib/contrib/iostream3/test/add_subdirectory_test.cmake.in +25 -0
  127. package/deps/zlib/contrib/iostream3/test/find_package_no_components_test.cmake.in +24 -0
  128. package/deps/zlib/contrib/iostream3/test/find_package_test.cmake.in +24 -0
  129. package/deps/zlib/contrib/iostream3/test/find_package_wrong_components_test.cmake.in +24 -0
  130. package/deps/zlib/contrib/iostream3/test.cc +50 -0
  131. package/deps/zlib/contrib/iostream3/zfstream.cc +479 -0
  132. package/deps/zlib/contrib/iostream3/zfstream.h +466 -0
  133. package/deps/zlib/contrib/minizip/CMakeLists.txt +387 -0
  134. package/deps/zlib/contrib/minizip/LICENSE.Info-Zip +58 -0
  135. package/deps/zlib/contrib/minizip/Makefile +33 -0
  136. package/deps/zlib/contrib/minizip/Makefile.am +45 -0
  137. package/deps/zlib/contrib/minizip/MiniZip64_Changes.txt +6 -0
  138. package/deps/zlib/contrib/minizip/MiniZip64_info.txt +69 -0
  139. package/deps/zlib/contrib/minizip/configure.ac +32 -0
  140. package/deps/zlib/contrib/minizip/crypt.h +125 -0
  141. package/deps/zlib/contrib/minizip/ints.h +57 -0
  142. package/deps/zlib/contrib/minizip/ioapi.c +231 -0
  143. package/deps/zlib/contrib/minizip/ioapi.h +183 -0
  144. package/deps/zlib/contrib/minizip/iowin32.c +447 -0
  145. package/deps/zlib/contrib/minizip/iowin32.h +27 -0
  146. package/deps/zlib/contrib/minizip/make_vms.com +25 -0
  147. package/deps/zlib/contrib/minizip/miniunz.c +647 -0
  148. package/deps/zlib/contrib/minizip/miniunzip.1 +63 -0
  149. package/deps/zlib/contrib/minizip/minizip.1 +46 -0
  150. package/deps/zlib/contrib/minizip/minizip.c +511 -0
  151. package/deps/zlib/contrib/minizip/minizip.pc.in +13 -0
  152. package/deps/zlib/contrib/minizip/minizip.pc.txt +13 -0
  153. package/deps/zlib/contrib/minizip/minizipConfig.cmake.in +27 -0
  154. package/deps/zlib/contrib/minizip/mztools.c +294 -0
  155. package/deps/zlib/contrib/minizip/mztools.h +37 -0
  156. package/deps/zlib/contrib/minizip/skipset.h +366 -0
  157. package/deps/zlib/contrib/minizip/test/CMakeLists.txt +176 -0
  158. package/deps/zlib/contrib/minizip/test/add_subdirectory_exclude_test.cmake.in +29 -0
  159. package/deps/zlib/contrib/minizip/test/add_subdirectory_test.cmake.in +28 -0
  160. package/deps/zlib/contrib/minizip/test/find_package_no_components_test.cmake.in +26 -0
  161. package/deps/zlib/contrib/minizip/test/find_package_test.cmake.in +26 -0
  162. package/deps/zlib/contrib/minizip/test/find_package_wrong_components_test.cmake.in +26 -0
  163. package/deps/zlib/contrib/minizip/test/test_helper.cm +32 -0
  164. package/deps/zlib/contrib/minizip/unzip.c +1984 -0
  165. package/deps/zlib/contrib/minizip/unzip.h +442 -0
  166. package/deps/zlib/contrib/minizip/zip.c +2246 -0
  167. package/deps/zlib/contrib/minizip/zip.h +371 -0
  168. package/deps/zlib/contrib/nuget/nuget.csproj +45 -0
  169. package/deps/zlib/contrib/nuget/nuget.sln +22 -0
  170. package/deps/zlib/contrib/pascal/example.pas +599 -0
  171. package/deps/zlib/contrib/pascal/readme.txt +76 -0
  172. package/deps/zlib/contrib/pascal/zlibd32.mak +99 -0
  173. package/deps/zlib/contrib/pascal/zlibpas.pas +276 -0
  174. package/deps/zlib/contrib/puff/CMakeLists.txt +154 -0
  175. package/deps/zlib/contrib/puff/Makefile +42 -0
  176. package/deps/zlib/contrib/puff/README +63 -0
  177. package/deps/zlib/contrib/puff/bin-writer.c +26 -0
  178. package/deps/zlib/contrib/puff/puff.c +840 -0
  179. package/deps/zlib/contrib/puff/puff.h +35 -0
  180. package/deps/zlib/contrib/puff/puffConfig.cmake.in +18 -0
  181. package/deps/zlib/contrib/puff/pufftest.c +168 -0
  182. package/deps/zlib/contrib/puff/test/CMakeLists.txt +262 -0
  183. package/deps/zlib/contrib/puff/test/add_subdirectory_exclude_test.cmake.in +26 -0
  184. package/deps/zlib/contrib/puff/test/add_subdirectory_test.cmake.in +25 -0
  185. package/deps/zlib/contrib/puff/test/find_package_no_components_test.cmake.in +24 -0
  186. package/deps/zlib/contrib/puff/test/find_package_test.cmake.in +24 -0
  187. package/deps/zlib/contrib/puff/test/find_package_wrong_components_test.cmake.in +24 -0
  188. package/deps/zlib/contrib/puff/test/tester-cov.cmake +58 -0
  189. package/deps/zlib/contrib/puff/test/tester.cmake +16 -0
  190. package/deps/zlib/contrib/puff/zeros.raw +0 -0
  191. package/deps/zlib/contrib/testzlib/CMakeLists.txt +44 -0
  192. package/deps/zlib/contrib/testzlib/testzlib.c +275 -0
  193. package/deps/zlib/contrib/testzlib/testzlib.txt +10 -0
  194. package/deps/zlib/contrib/vstudio/readme.txt +22 -0
  195. package/deps/zlib/contrib/zlib1-dll/CMakeLists.txt +196 -0
  196. package/deps/zlib/contrib/zlib1-dll/readme.txt +21 -0
  197. package/deps/zlib/crc32.c +983 -0
  198. package/deps/zlib/crc32.h +9446 -0
  199. package/deps/zlib/deflate.c +2185 -0
  200. package/deps/zlib/deflate.h +383 -0
  201. package/deps/zlib/doc/algorithm.txt +209 -0
  202. package/deps/zlib/doc/crc-doc.1.0.pdf +0 -0
  203. package/deps/zlib/doc/rfc1950.txt +619 -0
  204. package/deps/zlib/doc/rfc1951.txt +955 -0
  205. package/deps/zlib/doc/rfc1952.txt +675 -0
  206. package/deps/zlib/doc/txtvsbin.txt +107 -0
  207. package/deps/zlib/examples/README.examples +54 -0
  208. package/deps/zlib/examples/enough.c +597 -0
  209. package/deps/zlib/examples/fitblk.c +233 -0
  210. package/deps/zlib/examples/gun.c +702 -0
  211. package/deps/zlib/examples/gzappend.c +504 -0
  212. package/deps/zlib/examples/gzjoin.c +449 -0
  213. package/deps/zlib/examples/gzlog.c +1061 -0
  214. package/deps/zlib/examples/gzlog.h +91 -0
  215. package/deps/zlib/examples/gznorm.c +474 -0
  216. package/deps/zlib/examples/zlib_how.html +550 -0
  217. package/deps/zlib/examples/zpipe.c +206 -0
  218. package/deps/zlib/examples/zran.c +546 -0
  219. package/deps/zlib/examples/zran.h +53 -0
  220. package/deps/zlib/gzclose.c +23 -0
  221. package/deps/zlib/gzguts.h +216 -0
  222. package/deps/zlib/gzlib.c +609 -0
  223. package/deps/zlib/gzread.c +668 -0
  224. package/deps/zlib/gzwrite.c +700 -0
  225. package/deps/zlib/infback.c +581 -0
  226. package/deps/zlib/inffast.c +321 -0
  227. package/deps/zlib/inffast.h +11 -0
  228. package/deps/zlib/inffixed.h +94 -0
  229. package/deps/zlib/inflate.c +1413 -0
  230. package/deps/zlib/inflate.h +126 -0
  231. package/deps/zlib/inftrees.c +424 -0
  232. package/deps/zlib/inftrees.h +64 -0
  233. package/deps/zlib/make_vms.com +867 -0
  234. package/deps/zlib/msdos/Makefile.bor +115 -0
  235. package/deps/zlib/msdos/Makefile.dj2 +104 -0
  236. package/deps/zlib/msdos/Makefile.emx +69 -0
  237. package/deps/zlib/msdos/Makefile.msc +112 -0
  238. package/deps/zlib/msdos/Makefile.tc +100 -0
  239. package/deps/zlib/os400/README400 +48 -0
  240. package/deps/zlib/os400/bndsrc +144 -0
  241. package/deps/zlib/os400/make.sh +383 -0
  242. package/deps/zlib/os400/zlibfixed.rpgle +578 -0
  243. package/deps/zlib/os400/zlibfree.rpgle +634 -0
  244. package/deps/zlib/qnx/package.qpg +141 -0
  245. package/deps/zlib/test/CMakeLists.txt +318 -0
  246. package/deps/zlib/test/add_subdirectory_exclude_test.cmake.in +29 -0
  247. package/deps/zlib/test/add_subdirectory_test.cmake.in +28 -0
  248. package/deps/zlib/test/example.c +552 -0
  249. package/deps/zlib/test/find_package_no_components_test.cmake.in +27 -0
  250. package/deps/zlib/test/find_package_test.cmake.in +27 -0
  251. package/deps/zlib/test/find_package_wrong_components_test.cmake.in +27 -0
  252. package/deps/zlib/test/infcover.c +672 -0
  253. package/deps/zlib/test/minigzip.c +592 -0
  254. package/deps/zlib/treebuild.xml +116 -0
  255. package/deps/zlib/trees.c +1119 -0
  256. package/deps/zlib/trees.h +128 -0
  257. package/deps/zlib/uncompr.c +101 -0
  258. package/deps/zlib/watcom/watcom_f.mak +43 -0
  259. package/deps/zlib/watcom/watcom_l.mak +43 -0
  260. package/deps/zlib/win32/DLL_FAQ.txt +381 -0
  261. package/deps/zlib/win32/Makefile.bor +109 -0
  262. package/deps/zlib/win32/Makefile.gcc +177 -0
  263. package/deps/zlib/win32/Makefile.msc +159 -0
  264. package/deps/zlib/win32/README-WIN32.txt +103 -0
  265. package/deps/zlib/win32/VisualC.txt +3 -0
  266. package/deps/zlib/win32/zlib.def +104 -0
  267. package/deps/zlib/win32/zlib1.rc +37 -0
  268. package/deps/zlib/zconf.h.in +551 -0
  269. package/deps/zlib/zlib.3 +149 -0
  270. package/deps/zlib/zlib.3.pdf +0 -0
  271. package/deps/zlib/zlib.h +2057 -0
  272. package/deps/zlib/zlib.map +116 -0
  273. package/deps/zlib/zlib.pc.cmakein +14 -0
  274. package/deps/zlib/zlib.pc.in +14 -0
  275. package/deps/zlib/zlibConfig.cmake.in +18 -0
  276. package/deps/zlib/zutil.c +313 -0
  277. package/deps/zlib/zutil.h +331 -0
  278. package/dist/index.d.ts +266 -0
  279. package/dist/index.js +1146 -0
  280. package/dist/libwz.js +5632 -0
  281. package/dist/libwz.wasm +0 -0
  282. package/include/wz/CRC32.h +182 -0
  283. package/include/wz/PngUtility.h +72 -0
  284. package/include/wz/PortalType.h +124 -0
  285. package/include/wz/Properties/WzBinaryProperty.h +70 -0
  286. package/include/wz/Properties/WzCanvasProperty.h +55 -0
  287. package/include/wz/Properties/WzConvexProperty.h +34 -0
  288. package/include/wz/Properties/WzDoubleProperty.h +32 -0
  289. package/include/wz/Properties/WzFloatProperty.h +30 -0
  290. package/include/wz/Properties/WzIntProperty.h +30 -0
  291. package/include/wz/Properties/WzLongProperty.h +30 -0
  292. package/include/wz/Properties/WzLuaProperty.h +31 -0
  293. package/include/wz/Properties/WzNullProperty.h +15 -0
  294. package/include/wz/Properties/WzPngProperty.h +53 -0
  295. package/include/wz/Properties/WzRawDataProperty.h +46 -0
  296. package/include/wz/Properties/WzShortProperty.h +31 -0
  297. package/include/wz/Properties/WzStringProperty.h +32 -0
  298. package/include/wz/Properties/WzSubProperty.h +35 -0
  299. package/include/wz/Properties/WzUOLProperty.h +44 -0
  300. package/include/wz/Properties/WzVectorProperty.h +40 -0
  301. package/include/wz/Properties/WzVideoProperty.h +43 -0
  302. package/include/wz/Result.h +58 -0
  303. package/include/wz/Util/Defines.h +16 -0
  304. package/include/wz/Util/ListFileParser.h +20 -0
  305. package/include/wz/Util/WzBinaryReader.h +95 -0
  306. package/include/wz/Util/WzBinaryWriter.h +72 -0
  307. package/include/wz/Util/WzBlobDataSource.h +30 -0
  308. package/include/wz/Util/WzDataSource.h +49 -0
  309. package/include/wz/Util/WzKeyGenerator.h +28 -0
  310. package/include/wz/Util/WzMutableKey.h +39 -0
  311. package/include/wz/Util/WzPath.h +37 -0
  312. package/include/wz/Util/WzStream.h +86 -0
  313. package/include/wz/Util/WzTool.h +42 -0
  314. package/include/wz/WzAESConstant.h +17 -0
  315. package/include/wz/WzDirectory.h +97 -0
  316. package/include/wz/WzEnums.h +76 -0
  317. package/include/wz/WzFile.h +99 -0
  318. package/include/wz/WzHeader.h +47 -0
  319. package/include/wz/WzImage.h +97 -0
  320. package/include/wz/WzImageProperty.h +92 -0
  321. package/include/wz/WzObject.h +55 -0
  322. package/include/wz/WzPropertyCollection.h +115 -0
  323. package/include/wz/wz.h +41 -0
  324. package/include/wz/wz_api.h +432 -0
  325. package/package.json +93 -0
  326. package/src/PngUtility.cpp +328 -0
  327. package/src/Properties/WzBinaryProperty.cpp +183 -0
  328. package/src/Properties/WzCanvasProperty.cpp +262 -0
  329. package/src/Properties/WzConvexProperty.cpp +159 -0
  330. package/src/Properties/WzDoubleProperty.cpp +12 -0
  331. package/src/Properties/WzFloatProperty.cpp +17 -0
  332. package/src/Properties/WzIntProperty.cpp +12 -0
  333. package/src/Properties/WzLongProperty.cpp +12 -0
  334. package/src/Properties/WzLuaProperty.cpp +37 -0
  335. package/src/Properties/WzNullProperty.cpp +11 -0
  336. package/src/Properties/WzPngProperty.cpp +637 -0
  337. package/src/Properties/WzRawDataProperty.cpp +116 -0
  338. package/src/Properties/WzShortProperty.cpp +12 -0
  339. package/src/Properties/WzStringProperty.cpp +44 -0
  340. package/src/Properties/WzSubProperty.cpp +129 -0
  341. package/src/Properties/WzUOLProperty.cpp +136 -0
  342. package/src/Properties/WzVectorProperty.cpp +22 -0
  343. package/src/Properties/WzVideoProperty.cpp +115 -0
  344. package/src/Util/ListFileParser.cpp +48 -0
  345. package/src/Util/WzBinaryReader.cpp +368 -0
  346. package/src/Util/WzBinaryWriter.cpp +305 -0
  347. package/src/Util/WzBlobDataSource.cpp +47 -0
  348. package/src/Util/WzDataSource.cpp +61 -0
  349. package/src/Util/WzKeyGenerator.cpp +43 -0
  350. package/src/Util/WzMutableKey.cpp +59 -0
  351. package/src/Util/WzStream.cpp +196 -0
  352. package/src/Util/WzTool.cpp +266 -0
  353. package/src/WzAESConstant.cpp +12 -0
  354. package/src/WzDirectory.cpp +669 -0
  355. package/src/WzEnums.cpp +20 -0
  356. package/src/WzFile.cpp +450 -0
  357. package/src/WzImage.cpp +350 -0
  358. package/src/WzImageProperty.cpp +469 -0
  359. package/src/WzObject.cpp +174 -0
  360. package/src/WzPropertyCollection.cpp +84 -0
  361. package/src/capi/wz_api.cpp +1996 -0
  362. package/src/node/binding.cpp +1776 -0
@@ -0,0 +1,44 @@
1
+ cmake_minimum_required(VERSION 3.12...3.31)
2
+
3
+ project(
4
+ testzlib
5
+ VERSION 1.0.0
6
+ LANGUAGES C
7
+ DESCRIPTION "A little program to test zlib"
8
+ HOMEPAGE_URL "https://www.zlib.net")
9
+
10
+ option(ZLIB_TESTZLIB_BUILD_SHARED "Enable building testzlib" ON)
11
+ option(ZLIB_TESTZLIB_BUILD_STATIC "Enable building static linked testzlib" ON)
12
+ option(ZLIB_TESTZLIB_INSTALL "Enable installation of testzlib" ON)
13
+
14
+ if(ZLIB_TESTZLIB_BUILD_SHARED)
15
+ add_executable(zlib_testzlib testzlib.c)
16
+ target_link_libraries(zlib_testzlib PRIVATE ZLIB::ZLIB)
17
+
18
+ set_target_properties(zlib_testzlib
19
+ PROPERTIES
20
+ OUTPUT_NAME testzlib)
21
+
22
+ if(ZLIB_TESTZLIB_INSTALL)
23
+ install(
24
+ TARGETS zlib_testzlib
25
+ COMPONENT Runtime
26
+ RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")
27
+ endif(ZLIB_TESTZLIB_INSTALL)
28
+ endif(ZLIB_TESTZLIB_BUILD_SHARED)
29
+
30
+ if(ZLIB_TESTZLIB_BUILD_STATIC)
31
+ add_executable(zlib_testzlibStatic testzlib.c)
32
+ target_link_libraries(zlib_testzlibStatic PRIVATE ZLIB::ZLIBSTATIC)
33
+
34
+ set_target_properties(zlib_testzlibStatic
35
+ PROPERTIES
36
+ OUTPUT_NAME testzlibStatic)
37
+
38
+ if(ZLIB_TESTZLIB_INSTALL)
39
+ install(
40
+ TARGETS zlib_testzlibStatic
41
+ COMPONENT Runtime
42
+ RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")
43
+ endif(ZLIB_TESTZLIB_INSTALL)
44
+ endif(ZLIB_TESTZLIB_BUILD_STATIC)
@@ -0,0 +1,275 @@
1
+ #include <stdio.h>
2
+ #include <stdlib.h>
3
+ #include <windows.h>
4
+
5
+ #include "zlib.h"
6
+
7
+
8
+ void MyDoMinus64(LARGE_INTEGER *R,LARGE_INTEGER A,LARGE_INTEGER B)
9
+ {
10
+ R->HighPart = A.HighPart - B.HighPart;
11
+ if (A.LowPart >= B.LowPart)
12
+ R->LowPart = A.LowPart - B.LowPart;
13
+ else
14
+ {
15
+ R->LowPart = A.LowPart - B.LowPart;
16
+ R->HighPart --;
17
+ }
18
+ }
19
+
20
+ #ifdef _M_X64
21
+ // see https://learn.microsoft.com/en-us/cpp/intrinsics/rdtsc?view=msvc-170 for __rdtsc
22
+ unsigned __int64 __rdtsc(void);
23
+ void BeginCountRdtsc(LARGE_INTEGER * pbeginTime64)
24
+ {
25
+ // printf("rdtsc = %I64x\n",__rdtsc());
26
+ pbeginTime64->QuadPart=__rdtsc();
27
+ }
28
+
29
+ LARGE_INTEGER GetResRdtsc(LARGE_INTEGER beginTime64,BOOL fComputeTimeQueryPerf)
30
+ {
31
+ LARGE_INTEGER LIres;
32
+ unsigned _int64 res=__rdtsc()-((unsigned _int64)(beginTime64.QuadPart));
33
+ LIres.QuadPart=res;
34
+ // printf("rdtsc = %I64x\n",__rdtsc());
35
+ return LIres;
36
+ }
37
+ #else
38
+ #ifdef _M_IX86
39
+ void myGetRDTSC32(LARGE_INTEGER * pbeginTime64)
40
+ {
41
+ DWORD dwEdx,dwEax;
42
+ _asm
43
+ {
44
+ rdtsc
45
+ mov dwEax,eax
46
+ mov dwEdx,edx
47
+ }
48
+ pbeginTime64->LowPart=dwEax;
49
+ pbeginTime64->HighPart=dwEdx;
50
+ }
51
+
52
+ void BeginCountRdtsc(LARGE_INTEGER * pbeginTime64)
53
+ {
54
+ myGetRDTSC32(pbeginTime64);
55
+ }
56
+
57
+ LARGE_INTEGER GetResRdtsc(LARGE_INTEGER beginTime64,BOOL fComputeTimeQueryPerf)
58
+ {
59
+ LARGE_INTEGER LIres,endTime64;
60
+ myGetRDTSC32(&endTime64);
61
+
62
+ LIres.LowPart=LIres.HighPart=0;
63
+ MyDoMinus64(&LIres,endTime64,beginTime64);
64
+ return LIres;
65
+ }
66
+ #else
67
+ void myGetRDTSC32(LARGE_INTEGER * pbeginTime64)
68
+ {
69
+ }
70
+
71
+ void BeginCountRdtsc(LARGE_INTEGER * pbeginTime64)
72
+ {
73
+ }
74
+
75
+ LARGE_INTEGER GetResRdtsc(LARGE_INTEGER beginTime64,BOOL fComputeTimeQueryPerf)
76
+ {
77
+ LARGE_INTEGER lr;
78
+ lr.QuadPart=0;
79
+ return lr;
80
+ }
81
+ #endif
82
+ #endif
83
+
84
+ void BeginCountPerfCounter(LARGE_INTEGER * pbeginTime64,BOOL fComputeTimeQueryPerf)
85
+ {
86
+ if ((!fComputeTimeQueryPerf) || (!QueryPerformanceCounter(pbeginTime64)))
87
+ {
88
+ pbeginTime64->LowPart = GetTickCount();
89
+ pbeginTime64->HighPart = 0;
90
+ }
91
+ }
92
+
93
+ DWORD GetMsecSincePerfCounter(LARGE_INTEGER beginTime64,BOOL fComputeTimeQueryPerf)
94
+ {
95
+ LARGE_INTEGER endTime64,ticksPerSecond,ticks;
96
+ DWORDLONG ticksShifted,tickSecShifted;
97
+ DWORD dwLog=16+0;
98
+ DWORD dwRet;
99
+ if ((!fComputeTimeQueryPerf) || (!QueryPerformanceCounter(&endTime64)))
100
+ dwRet = (GetTickCount() - beginTime64.LowPart)*1;
101
+ else
102
+ {
103
+ MyDoMinus64(&ticks,endTime64,beginTime64);
104
+ QueryPerformanceFrequency(&ticksPerSecond);
105
+
106
+
107
+ {
108
+ ticksShifted = Int64ShrlMod32(*(DWORDLONG*)&ticks,dwLog);
109
+ tickSecShifted = Int64ShrlMod32(*(DWORDLONG*)&ticksPerSecond,dwLog);
110
+
111
+ }
112
+
113
+ dwRet = (DWORD)((((DWORD)ticksShifted)*1000)/(DWORD)(tickSecShifted));
114
+ dwRet *=1;
115
+ }
116
+ return dwRet;
117
+ }
118
+
119
+ int ReadFileMemory(const char* filename,long* plFileSize,unsigned char** pFilePtr)
120
+ {
121
+ FILE* stream;
122
+ unsigned char* ptr;
123
+ int retVal=1;
124
+ stream=fopen(filename, "rb");
125
+ if (stream==NULL)
126
+ return 0;
127
+
128
+ fseek(stream,0,SEEK_END);
129
+
130
+ *plFileSize=ftell(stream);
131
+ fseek(stream,0,SEEK_SET);
132
+ ptr=malloc((*plFileSize)+1);
133
+ if (ptr==NULL)
134
+ retVal=0;
135
+ else
136
+ {
137
+ if (fread(ptr, 1, *plFileSize,stream) != (*plFileSize))
138
+ retVal=0;
139
+ }
140
+ fclose(stream);
141
+ *pFilePtr=ptr;
142
+ return retVal;
143
+ }
144
+
145
+ int main(int argc, char *argv[])
146
+ {
147
+ int BlockSizeCompress=0x8000;
148
+ int BlockSizeUncompress=0x8000;
149
+ int cprLevel=Z_DEFAULT_COMPRESSION ;
150
+ long lFileSize;
151
+ unsigned char* FilePtr;
152
+ long lBufferSizeCpr;
153
+ long lBufferSizeUncpr;
154
+ long lCompressedSize=0;
155
+ unsigned char* CprPtr;
156
+ unsigned char* UncprPtr;
157
+ long lSizeCpr,lSizeUncpr;
158
+ DWORD dwGetTick,dwMsecQP;
159
+ LARGE_INTEGER li_qp,li_rdtsc,dwResRdtsc;
160
+
161
+ if (argc<=1)
162
+ {
163
+ printf("run TestZlib <File> [BlockSizeCompress] [BlockSizeUncompress] [compres. level]\n");
164
+ return 0;
165
+ }
166
+
167
+ if (ReadFileMemory(argv[1],&lFileSize,&FilePtr)==0)
168
+ {
169
+ printf("error reading %s\n",argv[1]);
170
+ return 1;
171
+ }
172
+ else printf("file %s read, %ld bytes\n",argv[1],lFileSize);
173
+
174
+ if (argc>=3)
175
+ BlockSizeCompress=atol(argv[2]);
176
+
177
+ if (argc>=4)
178
+ BlockSizeUncompress=atol(argv[3]);
179
+
180
+ if (argc>=5)
181
+ cprLevel=(int)atol(argv[4]);
182
+
183
+ lBufferSizeCpr = lFileSize + (lFileSize/0x10) + 0x200;
184
+ lBufferSizeUncpr = lBufferSizeCpr;
185
+
186
+ CprPtr=(unsigned char*)malloc(lBufferSizeCpr + BlockSizeCompress);
187
+
188
+ BeginCountPerfCounter(&li_qp,TRUE);
189
+ dwGetTick=GetTickCount();
190
+ BeginCountRdtsc(&li_rdtsc);
191
+ {
192
+ z_stream zcpr;
193
+ int ret=Z_OK;
194
+ long lOrigToDo = lFileSize;
195
+ long lOrigDone = 0;
196
+ int step=0;
197
+ memset(&zcpr,0,sizeof(z_stream));
198
+ deflateInit(&zcpr,cprLevel);
199
+
200
+ zcpr.next_in = FilePtr;
201
+ zcpr.next_out = CprPtr;
202
+
203
+
204
+ do
205
+ {
206
+ long all_read_before = zcpr.total_in;
207
+ zcpr.avail_in = min(lOrigToDo,BlockSizeCompress);
208
+ zcpr.avail_out = BlockSizeCompress;
209
+ ret=deflate(&zcpr,(zcpr.avail_in==lOrigToDo) ? Z_FINISH : Z_SYNC_FLUSH);
210
+ lOrigDone += (zcpr.total_in-all_read_before);
211
+ lOrigToDo -= (zcpr.total_in-all_read_before);
212
+ step++;
213
+ } while (ret==Z_OK);
214
+
215
+ lSizeCpr=zcpr.total_out;
216
+ deflateEnd(&zcpr);
217
+ dwGetTick=GetTickCount()-dwGetTick;
218
+ dwMsecQP=GetMsecSincePerfCounter(li_qp,TRUE);
219
+ dwResRdtsc=GetResRdtsc(li_rdtsc,TRUE);
220
+ printf("total compress size = %u, in %u step\n",lSizeCpr,step);
221
+ printf("time = %u msec = %f sec\n",dwGetTick,dwGetTick/(double)1000.);
222
+ printf("defcpr time QP = %u msec = %f sec\n",dwMsecQP,dwMsecQP/(double)1000.);
223
+ printf("defcpr result rdtsc = %I64x\n\n",dwResRdtsc.QuadPart);
224
+ }
225
+
226
+ CprPtr=(unsigned char*)realloc(CprPtr,lSizeCpr);
227
+ UncprPtr=(unsigned char*)malloc(lBufferSizeUncpr + BlockSizeUncompress);
228
+
229
+ BeginCountPerfCounter(&li_qp,TRUE);
230
+ dwGetTick=GetTickCount();
231
+ BeginCountRdtsc(&li_rdtsc);
232
+ {
233
+ z_stream zcpr;
234
+ int ret=Z_OK;
235
+ long lOrigToDo = lSizeCpr;
236
+ long lOrigDone = 0;
237
+ int step=0;
238
+ memset(&zcpr,0,sizeof(z_stream));
239
+ inflateInit(&zcpr);
240
+
241
+ zcpr.next_in = CprPtr;
242
+ zcpr.next_out = UncprPtr;
243
+
244
+
245
+ do
246
+ {
247
+ long all_read_before = zcpr.total_in;
248
+ zcpr.avail_in = min(lOrigToDo,BlockSizeUncompress);
249
+ zcpr.avail_out = BlockSizeUncompress;
250
+ ret=inflate(&zcpr,Z_SYNC_FLUSH);
251
+ lOrigDone += (zcpr.total_in-all_read_before);
252
+ lOrigToDo -= (zcpr.total_in-all_read_before);
253
+ step++;
254
+ } while (ret==Z_OK);
255
+
256
+ lSizeUncpr=zcpr.total_out;
257
+ inflateEnd(&zcpr);
258
+ dwGetTick=GetTickCount()-dwGetTick;
259
+ dwMsecQP=GetMsecSincePerfCounter(li_qp,TRUE);
260
+ dwResRdtsc=GetResRdtsc(li_rdtsc,TRUE);
261
+ printf("total uncompress size = %u, in %u step\n",lSizeUncpr,step);
262
+ printf("time = %u msec = %f sec\n",dwGetTick,dwGetTick/(double)1000.);
263
+ printf("uncpr time QP = %u msec = %f sec\n",dwMsecQP,dwMsecQP/(double)1000.);
264
+ printf("uncpr result rdtsc = %I64x\n\n",dwResRdtsc.QuadPart);
265
+ }
266
+
267
+ if (lSizeUncpr==lFileSize)
268
+ {
269
+ if (memcmp(FilePtr,UncprPtr,lFileSize)==0)
270
+ printf("compare ok\n");
271
+
272
+ }
273
+
274
+ return 0;
275
+ }
@@ -0,0 +1,10 @@
1
+ To build testzLib with Visual Studio 2005:
2
+
3
+ copy to a directory file from :
4
+ - root of zLib tree
5
+ - contrib/testzlib
6
+ - contrib/masmx86
7
+ - contrib/masmx64
8
+ - contrib/vstudio/vc7
9
+
10
+ and open testzlib8.sln
@@ -0,0 +1,22 @@
1
+ The pre-made Visual Studio projects have been removed in lieu of the ability to
2
+ use cmake to build such projects on demand.
3
+
4
+ To create a Visual Studio project
5
+ ---------------------------------
6
+
7
+ 1. Start cmake-gui.
8
+ 2. Point source-dir to the source.
9
+ 3. Point build-dir to the dir where you want to build.
10
+ 4. Hit configure -- there you can select details.
11
+ 5. Select the options you want, which are shown with descriptions after the
12
+ configure run is complete.
13
+ 6. Hit configure again to assure that everything that is needed is found.
14
+ 7. For those not found, deactivate the option or install the dependency, e.g.
15
+ bzip2 for minizip, and go back to step 6 until there is no red.
16
+ 8. Hit generate.
17
+ 9. Hit open project.
18
+
19
+ Now you can Build > Build solution.
20
+
21
+
22
+ See contrib/zlib1-dll/readme.txt for how to build the legacy zlib1.dll.
@@ -0,0 +1,196 @@
1
+ cmake_minimum_required(VERSION 3.12...3.31)
2
+
3
+ project(
4
+ zlib1-dll
5
+ LANGUAGES C
6
+ VERSION 1.3.2
7
+ HOMEPAGE_URL "https://zlib.net/"
8
+ DESCRIPTION "zlib1.dll is the legacy DLL with zlib and minizip")
9
+
10
+ # ============================================================================
11
+ # configuration
12
+ # ============================================================================
13
+
14
+ if(NOT WIN32)
15
+ message(FATAL_ERROR "This creates zlib1.<DLL>, Nothing else")
16
+ endif(NOT WIN32)
17
+
18
+ option(ENABLE_BZIP2 "Build with bzip2 support" OFF)
19
+ set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS TRUE)
20
+
21
+ include(CheckCSourceCompiles)
22
+ include(CheckFunctionExists)
23
+ include(CheckIncludeFile)
24
+ include(CMakePackageConfigHelpers)
25
+ include(CheckTypeSize)
26
+ include(CPack)
27
+ include(GNUInstallDirs)
28
+
29
+ if(NOT ZLIB_CONF_WRITTEN)
30
+ set(CONF_OUT_FILE ${zlib1-dll_BINARY_DIR}/zconf.h.cmakein)
31
+ file(READ ../../zconf.h ZCONF_CONTENT LIMIT 245)
32
+ file(WRITE ${CONF_OUT_FILE} ${ZCONF_CONTENT})
33
+ file(APPEND ${CONF_OUT_FILE} "#cmakedefine Z_PREFIX 1\n")
34
+ file(APPEND ${CONF_OUT_FILE} "#cmakedefine HAVE_STDARG_H 1\n")
35
+ file(APPEND ${CONF_OUT_FILE} "#cmakedefine HAVE_UNISTD_H 1\n")
36
+ file(READ ../../zconf.h ZCONF_CONTENT OFFSET 244)
37
+ set(FIRST_ITEM TRUE)
38
+
39
+ foreach(item IN LISTS ZCONF_CONTENT)
40
+ if(FIRST_ITEM)
41
+ string(APPEND OUT_CONTENT ${item})
42
+ set(FIRST_ITEM FALSE)
43
+ else(FIRST_ITEM)
44
+ string(APPEND OUT_CONTENT "\;" ${item})
45
+ endif(FIRST_ITEM)
46
+ endforeach(item IN LISTS ${ZCONF_CONTENT})
47
+
48
+ file(APPEND ${CONF_OUT_FILE} ${OUT_CONTENT})
49
+ set(ZLIB_CONF_WRITTEN
50
+ TRUE
51
+ CACHE BOOL "zconf.h.cmakein was created")
52
+ mark_as_advanced(ZLIB_CONF_WRITTEN)
53
+ endif(NOT ZLIB_CONF_WRITTEN)
54
+
55
+ if(ENABLE_BZIP2)
56
+ find_package(BZip2 REQUIRED)
57
+ endif(ENABLE_BZIP2)
58
+
59
+ #
60
+ # Check for fopen64
61
+ #
62
+ check_function_exists(fopen64 HAVE_FOPEN64)
63
+
64
+ #
65
+ # Check to see if we have large file support
66
+ #
67
+ set(CMAKE_REQUIRED_DEFINITIONS -D_LARGEFILE64_SOURCE=1)
68
+ check_type_size(off64_t OFF64_T)
69
+ unset(CMAKE_REQUIRED_DEFINITIONS) # clear variable
70
+
71
+ #
72
+ # Check for fseeko
73
+ #
74
+ check_function_exists(fseeko HAVE_FSEEKO)
75
+
76
+ #
77
+ # Check for stdarg.h
78
+ #
79
+ check_include_file(stdarg.h HAVE_STDARG_H)
80
+
81
+ #
82
+ # Check for unistd.h
83
+ #
84
+ check_include_file(unistd.h HAVE_UNISTD_H)
85
+
86
+ #
87
+ # Check visibility attribute is supported
88
+ #
89
+ if(MSVC)
90
+ set(CMAKE_REQUIRED_FLAGS "-WX")
91
+ else(MSVC)
92
+ set(CMAKE_REQUIRED_FLAGS "-Werror")
93
+ endif(MSVC)
94
+
95
+ check_c_source_compiles(
96
+ "
97
+ #include <stdlib.h>
98
+ static void f(void) __attribute__ ((visibility(\"hidden\")));
99
+ int main(void) {return 0;}
100
+ "
101
+ HAVE___ATTR__VIS_HIDDEN)
102
+
103
+ unset(CMAKE_COMPILE_FLAGS)
104
+ configure_file(${zlib1-dll_BINARY_DIR}/zconf.h.cmakein ${zlib1-dll_BINARY_DIR}/zconf.h)
105
+
106
+ # ============================================================================
107
+ # zlib1-dll
108
+ # ============================================================================
109
+ set(ZLIB1-DLL_PUBLIC_HDRS
110
+ ${zlib1-dll_BINARY_DIR}/zconf.h
111
+ ../../zlib.h
112
+ ../minizip/crypt.h
113
+ ../minizip/ints.h
114
+ ../minizip/ioapi.h
115
+ ../minizip/mztools.h
116
+ ../minizip/unzip.h
117
+ ../minizip/zip.h)
118
+
119
+ set(ZLIB1-DLL_PRIVATE_HDRS
120
+ ../../crc32.h
121
+ ../../deflate.h
122
+ ../../gzguts.h
123
+ ../../inffast.h
124
+ ../../inffixed.h
125
+ ../../inflate.h
126
+ ../../inftrees.h
127
+ ../../trees.h
128
+ ../../zutil.h)
129
+
130
+ set(ZLIB1-DLL_SRCS
131
+ ../../adler32.c
132
+ ../../compress.c
133
+ ../../crc32.c
134
+ ../../deflate.c
135
+ ../../gzclose.c
136
+ ../../gzlib.c
137
+ ../../gzread.c
138
+ ../../gzwrite.c
139
+ ../../inflate.c
140
+ ../../infback.c
141
+ ../../inftrees.c
142
+ ../../inffast.c
143
+ ../../trees.c
144
+ ../../uncompr.c
145
+ ../../win32/zlib1.rc
146
+ ../../zutil.c
147
+ ../minizip/ioapi.c
148
+ ../minizip/mztools.c
149
+ ../minizip/unzip.c
150
+ ../minizip/zip.c)
151
+
152
+ add_library(zlib1 SHARED ${ZLIB1-DLL_SRCS}
153
+ ${ZLIB1-DLL_PUBLIC_HDRS}
154
+ ${ZLIB1-DLL_PRIVATE_HDRS})
155
+
156
+ #taget_include_directories doesn't like relative paths
157
+ include_directories(../../
158
+ ../minizip
159
+ ${CMAKE_CURRENT_BINARY_DIR})
160
+
161
+ target_compile_definitions(zlib1
162
+ PRIVATE ZLIB_BUILD
163
+ $<$<BOOL:NOT:${HAVE_FSEEKO}>:NO_FSEEKO>
164
+ $<$<BOOL:${HAVE_UNISTD_H}>:HAVE_UNISTD_H=1>
165
+ $<$<BOOL:${HAVE___ATTR__VIS_HIDDEN}>:HAVE_HIDDEN>
166
+ $<$<BOOL:${MSVC}>:_CRT_SECURE_NO_DEPRECATE>
167
+ $<$<BOOL:${MSVC}>:_CRT_NONSTDC_NO_DEPRECATE>
168
+ PUBLIC $<$<BOOL:${HAVE_OFF64_T}>:_LARGEFILE64_SOURCE=1>
169
+ $<$<BOOL:${BZIP2_FOUND}>:HAVE_BZIP2=1>
170
+ $<$<BOOL:NOT:${HAVE_FOPEN64}>:USE_FILE32API=1>)
171
+
172
+ target_link_libraries(zlib1
173
+ PUBLIC $<$<BOOL:${BZIP2_FOUND}>:BZip2::BZip2>)
174
+
175
+ if(NOT CYGWIN)
176
+ set_target_properties(zlib1 PROPERTIES
177
+ SOVERSION ${zlib1-dll_VERSION_MAJOR}
178
+ VERSION ${zlib1-dll_VERSION})
179
+ endif(NOT CYGWIN)
180
+
181
+ set_target_properties(zlib1 PROPERTIES
182
+ DEFINE_SYMBOL ZLIB_DLL)
183
+
184
+ install(
185
+ TARGETS zlib1
186
+ ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
187
+ RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
188
+ LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}")
189
+
190
+ install(
191
+ FILES ${ZLIB1-DLL_PUBLIC_HDRS}
192
+ DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
193
+
194
+ install(
195
+ FILES ../../LICENSE
196
+ DESTINATION "${CMAKE_INSTALL_DOCDIR}/zlib1-dll")
@@ -0,0 +1,21 @@
1
+ Use this directory to build the legacy zlib1.dll for Windows, which contains
2
+ both zlib and minizip. Use cmake either at the command prompt, or with Visual
3
+ Studio as outlined below.
4
+
5
+
6
+ To create a Visual Studio project
7
+ ---------------------------------
8
+
9
+ 1. Start cmake-gui.
10
+ 2. Point source-dir to the source.
11
+ 3. Point build-dir to the dir where you want to build.
12
+ 4. Hit configure -- there you can select details.
13
+ 5. Select the options you want, which are shown with descriptions after the
14
+ configure run is complete.
15
+ 6. Hit configure again to assure that everything that is needed is found.
16
+ 7. For those not found, deactivate the option or install the dependency, e.g.
17
+ bzip2 for minizip, and go back to step 6 until there is no red.
18
+ 8. Hit generate.
19
+ 9. Hit open project.
20
+
21
+ Now you can Build > Build solution.