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,331 @@
1
+ /* zutil.h -- internal interface and configuration of the compression library
2
+ * Copyright (C) 1995-2026 Jean-loup Gailly, Mark Adler
3
+ * For conditions of distribution and use, see copyright notice in zlib.h
4
+ */
5
+
6
+ /* WARNING: this file should *not* be used by applications. It is
7
+ part of the implementation of the compression library and is
8
+ subject to change. Applications should only use zlib.h.
9
+ */
10
+
11
+ /* @(#) $Id$ */
12
+
13
+ #ifndef ZUTIL_H
14
+ #define ZUTIL_H
15
+
16
+ #ifdef HAVE_HIDDEN
17
+ # define ZLIB_INTERNAL __attribute__((visibility ("hidden")))
18
+ #else
19
+ # define ZLIB_INTERNAL
20
+ #endif
21
+
22
+ #include "zlib.h"
23
+
24
+ #if defined(STDC) && !defined(Z_SOLO)
25
+ # if !(defined(_WIN32_WCE) && defined(_MSC_VER))
26
+ # include <stddef.h>
27
+ # endif
28
+ # include <string.h>
29
+ # include <stdlib.h>
30
+ #endif
31
+
32
+ #ifndef local
33
+ # define local static
34
+ #endif
35
+ /* since "static" is used to mean two completely different things in C, we
36
+ define "local" for the non-static meaning of "static", for readability
37
+ (compile with -Dlocal if your debugger can't find static symbols) */
38
+
39
+ extern const char deflate_copyright[];
40
+ extern const char inflate_copyright[];
41
+ extern const char inflate9_copyright[];
42
+
43
+ typedef unsigned char uch;
44
+ typedef uch FAR uchf;
45
+ typedef unsigned short ush;
46
+ typedef ush FAR ushf;
47
+ typedef unsigned long ulg;
48
+
49
+ #if !defined(Z_U8) && !defined(Z_SOLO) && defined(STDC)
50
+ # include <limits.h>
51
+ # if (ULONG_MAX == 0xffffffffffffffff)
52
+ # define Z_U8 unsigned long
53
+ # elif (ULLONG_MAX == 0xffffffffffffffff)
54
+ # define Z_U8 unsigned long long
55
+ # elif (ULONG_LONG_MAX == 0xffffffffffffffff)
56
+ # define Z_U8 unsigned long long
57
+ # elif (UINT_MAX == 0xffffffffffffffff)
58
+ # define Z_U8 unsigned
59
+ # endif
60
+ #endif
61
+
62
+ extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
63
+ /* (size given to avoid silly warnings with Visual C++) */
64
+
65
+ #define ERR_MSG(err) z_errmsg[(err) < -6 || (err) > 2 ? 9 : 2 - (err)]
66
+
67
+ #define ERR_RETURN(strm,err) \
68
+ return (strm->msg = ERR_MSG(err), (err))
69
+ /* To be used only when the state is known to be valid */
70
+
71
+ /* common constants */
72
+ #if MAX_WBITS < 9 || MAX_WBITS > 15
73
+ # error MAX_WBITS must be in 9..15
74
+ #endif
75
+ #ifndef DEF_WBITS
76
+ # define DEF_WBITS MAX_WBITS
77
+ #endif
78
+ /* default windowBits for decompression. MAX_WBITS is for compression only */
79
+
80
+ #if MAX_MEM_LEVEL >= 8
81
+ # define DEF_MEM_LEVEL 8
82
+ #else
83
+ # define DEF_MEM_LEVEL MAX_MEM_LEVEL
84
+ #endif
85
+ /* default memLevel */
86
+
87
+ #define STORED_BLOCK 0
88
+ #define STATIC_TREES 1
89
+ #define DYN_TREES 2
90
+ /* The three kinds of block type */
91
+
92
+ #define MIN_MATCH 3
93
+ #define MAX_MATCH 258
94
+ /* The minimum and maximum match lengths */
95
+
96
+ #define PRESET_DICT 0x20 /* preset dictionary flag in zlib header */
97
+
98
+ /* target dependencies */
99
+
100
+ #if defined(MSDOS) || (defined(WINDOWS) && !defined(WIN32))
101
+ # define OS_CODE 0x00
102
+ # ifndef Z_SOLO
103
+ # if defined(__TURBOC__) || defined(__BORLANDC__)
104
+ # if (__STDC__ == 1) && (defined(__LARGE__) || defined(__COMPACT__))
105
+ /* Allow compilation with ANSI keywords only enabled */
106
+ void _Cdecl farfree( void *block );
107
+ void *_Cdecl farmalloc( unsigned long nbytes );
108
+ # else
109
+ # include <alloc.h>
110
+ # endif
111
+ # else /* MSC or DJGPP */
112
+ # include <malloc.h>
113
+ # endif
114
+ # endif
115
+ #endif
116
+
117
+ #ifdef AMIGA
118
+ # define OS_CODE 1
119
+ #endif
120
+
121
+ #if defined(VAXC) || defined(VMS)
122
+ # define OS_CODE 2
123
+ # define F_OPEN(name, mode) \
124
+ fopen((name), (mode), "mbc=60", "ctx=stm", "rfm=fix", "mrs=512")
125
+ #endif
126
+
127
+ #ifdef __370__
128
+ # if __TARGET_LIB__ < 0x20000000
129
+ # define OS_CODE 4
130
+ # elif __TARGET_LIB__ < 0x40000000
131
+ # define OS_CODE 11
132
+ # else
133
+ # define OS_CODE 8
134
+ # endif
135
+ #endif
136
+
137
+ #if defined(ATARI) || defined(atarist)
138
+ # define OS_CODE 5
139
+ #endif
140
+
141
+ #ifdef OS2
142
+ # define OS_CODE 6
143
+ # if defined(M_I86) && !defined(Z_SOLO)
144
+ # include <malloc.h>
145
+ # endif
146
+ #endif
147
+
148
+ #if defined(MACOS)
149
+ # define OS_CODE 7
150
+ #endif
151
+
152
+ #if defined(__acorn) || defined(__riscos)
153
+ # define OS_CODE 13
154
+ #endif
155
+
156
+ #if defined(WIN32) && !defined(__CYGWIN__)
157
+ # define OS_CODE 10
158
+ #endif
159
+
160
+ #ifdef _BEOS_
161
+ # define OS_CODE 16
162
+ #endif
163
+
164
+ #ifdef __TOS_OS400__
165
+ # define OS_CODE 18
166
+ #endif
167
+
168
+ #ifdef __APPLE__
169
+ # define OS_CODE 19
170
+ #endif
171
+
172
+ #if defined(__BORLANDC__) && !defined(MSDOS)
173
+ #pragma warn -8004
174
+ #pragma warn -8008
175
+ #pragma warn -8066
176
+ #endif
177
+
178
+ /* provide prototypes for these when building zlib without LFS */
179
+ #ifndef Z_LARGE64
180
+ ZEXTERN uLong ZEXPORT adler32_combine64(uLong, uLong, z_off64_t);
181
+ ZEXTERN uLong ZEXPORT crc32_combine64(uLong, uLong, z_off64_t);
182
+ ZEXTERN uLong ZEXPORT crc32_combine_gen64(z_off64_t);
183
+ #endif
184
+
185
+ /* common defaults */
186
+
187
+ #ifndef OS_CODE
188
+ # define OS_CODE 3 /* assume Unix */
189
+ #endif
190
+
191
+ #ifndef F_OPEN
192
+ # define F_OPEN(name, mode) fopen((name), (mode))
193
+ #endif
194
+
195
+ /* functions */
196
+
197
+ #if defined(pyr) || defined(Z_SOLO)
198
+ # define NO_MEMCPY
199
+ #endif
200
+ #if defined(SMALL_MEDIUM) && !defined(_MSC_VER) && !defined(__SC__)
201
+ /* Use our own functions for small and medium model with MSC <= 5.0.
202
+ * You may have to use the same strategy for Borland C (untested).
203
+ * The __SC__ check is for Symantec.
204
+ */
205
+ # define NO_MEMCPY
206
+ #endif
207
+ #if defined(STDC) && !defined(HAVE_MEMCPY) && !defined(NO_MEMCPY)
208
+ # define HAVE_MEMCPY
209
+ #endif
210
+ #ifdef HAVE_MEMCPY
211
+ # ifdef SMALL_MEDIUM /* MSDOS small or medium model */
212
+ # define zmemcpy _fmemcpy
213
+ # define zmemcmp _fmemcmp
214
+ # define zmemzero(dest, len) _fmemset(dest, 0, len)
215
+ # else
216
+ # define zmemcpy memcpy
217
+ # define zmemcmp memcmp
218
+ # define zmemzero(dest, len) memset(dest, 0, len)
219
+ # endif
220
+ #else
221
+ void ZLIB_INTERNAL zmemcpy(void FAR *, const void FAR *, z_size_t);
222
+ int ZLIB_INTERNAL zmemcmp(const void FAR *, const void FAR *, z_size_t);
223
+ void ZLIB_INTERNAL zmemzero(void FAR *, z_size_t);
224
+ #endif
225
+
226
+ /* Diagnostic functions */
227
+ #ifdef ZLIB_DEBUG
228
+ # include <stdio.h>
229
+ extern int ZLIB_INTERNAL z_verbose;
230
+ extern void ZLIB_INTERNAL z_error(char *m);
231
+ # define Assert(cond,msg) {if(!(cond)) z_error(msg);}
232
+ # define Trace(x) {if (z_verbose>=0) fprintf x ;}
233
+ # define Tracev(x) {if (z_verbose>0) fprintf x ;}
234
+ # define Tracevv(x) {if (z_verbose>1) fprintf x ;}
235
+ # define Tracec(c,x) {if (z_verbose>0 && (c)) fprintf x ;}
236
+ # define Tracecv(c,x) {if (z_verbose>1 && (c)) fprintf x ;}
237
+ #else
238
+ # define Assert(cond,msg)
239
+ # define Trace(x)
240
+ # define Tracev(x)
241
+ # define Tracevv(x)
242
+ # define Tracec(c,x)
243
+ # define Tracecv(c,x)
244
+ #endif
245
+
246
+ #ifndef Z_SOLO
247
+ voidpf ZLIB_INTERNAL zcalloc(voidpf opaque, unsigned items,
248
+ unsigned size);
249
+ void ZLIB_INTERNAL zcfree(voidpf opaque, voidpf ptr);
250
+ #endif
251
+
252
+ #define ZALLOC(strm, items, size) \
253
+ (*((strm)->zalloc))((strm)->opaque, (items), (size))
254
+ #define ZFREE(strm, addr) (*((strm)->zfree))((strm)->opaque, (voidpf)(addr))
255
+ #define TRY_FREE(s, p) {if (p) ZFREE(s, p);}
256
+
257
+ /* Reverse the bytes in a 32-bit value */
258
+ #define ZSWAP32(q) ((((q) >> 24) & 0xff) + (((q) >> 8) & 0xff00) + \
259
+ (((q) & 0xff00) << 8) + (((q) & 0xff) << 24))
260
+
261
+ #ifdef Z_ONCE
262
+ /*
263
+ Create a local z_once() function depending on the availability of atomics.
264
+ */
265
+
266
+ /* Check for the availability of atomics. */
267
+ #if defined(__STDC__) && __STDC_VERSION__ >= 201112L && \
268
+ !defined(__STDC_NO_ATOMICS__)
269
+
270
+ #include <stdatomic.h>
271
+ typedef struct {
272
+ atomic_flag begun;
273
+ atomic_int done;
274
+ } z_once_t;
275
+ #define Z_ONCE_INIT {ATOMIC_FLAG_INIT, 0}
276
+
277
+ /*
278
+ Run the provided init() function exactly once, even if multiple threads
279
+ invoke once() at the same time. The state must be a once_t initialized with
280
+ Z_ONCE_INIT.
281
+ */
282
+ local void z_once(z_once_t *state, void (*init)(void)) {
283
+ if (!atomic_load(&state->done)) {
284
+ if (atomic_flag_test_and_set(&state->begun))
285
+ while (!atomic_load(&state->done))
286
+ ;
287
+ else {
288
+ init();
289
+ atomic_store(&state->done, 1);
290
+ }
291
+ }
292
+ }
293
+
294
+ #else /* no atomics */
295
+
296
+ #warning zlib not thread-safe
297
+
298
+ typedef struct z_once_s {
299
+ volatile int begun;
300
+ volatile int done;
301
+ } z_once_t;
302
+ #define Z_ONCE_INIT {0, 0}
303
+
304
+ /* Test and set. Alas, not atomic, but tries to limit the period of
305
+ vulnerability. */
306
+ local int test_and_set(int volatile *flag) {
307
+ int was;
308
+
309
+ was = *flag;
310
+ *flag = 1;
311
+ return was;
312
+ }
313
+
314
+ /* Run the provided init() function once. This is not thread-safe. */
315
+ local void z_once(z_once_t *state, void (*init)(void)) {
316
+ if (!state->done) {
317
+ if (test_and_set(&state->begun))
318
+ while (!state->done)
319
+ ;
320
+ else {
321
+ init();
322
+ state->done = 1;
323
+ }
324
+ }
325
+ }
326
+
327
+ #endif /* ?atomics */
328
+
329
+ #endif /* Z_ONCE */
330
+
331
+ #endif /* ZUTIL_H */
@@ -0,0 +1,266 @@
1
+ declare enum MapleVersion {
2
+ GMS = 0,
3
+ EMS = 1,
4
+ BMS = 2,
5
+ CLASSIC = 3,
6
+ GENERATE = 4,
7
+ GETFROMZLZ = 5,
8
+ CUSTOM = 6,
9
+ UNKNOWN = 99
10
+ }
11
+ declare enum ParseStatus {
12
+ PATH_IS_NULL = -1,
13
+ ERROR_GAME_VER_HASH = -2,
14
+ FAILED_UNKNOWN = 0,
15
+ SUCCESS = 1
16
+ }
17
+ declare enum PropertyType {
18
+ NULL = 0,
19
+ SHORT = 1,
20
+ INT = 2,
21
+ LONG = 3,
22
+ FLOAT = 4,
23
+ DOUBLE = 5,
24
+ STRING = 6,
25
+ SUB = 7,
26
+ CANVAS = 8,
27
+ VECTOR = 9,
28
+ CONVEX = 10,
29
+ SOUND = 11,
30
+ RAW = 12,
31
+ UOL = 13,
32
+ LUA = 14,
33
+ PNG = 15
34
+ }
35
+ declare enum ObjectType {
36
+ FILE = 0,
37
+ IMAGE = 1,
38
+ DIRECTORY = 2,
39
+ PROPERTY = 3,
40
+ LIST = 4
41
+ }
42
+ declare enum BinaryType {
43
+ RAW = 0,
44
+ MP3 = 1,
45
+ WAV = 2
46
+ }
47
+ declare class WzObject {
48
+ protected _ptr: NativeHandle;
49
+ protected _ownsNative: boolean;
50
+ constructor(ptr: NativeHandle, ownsNative?: boolean);
51
+ nativePtr(): NativeHandle;
52
+ protected _assertAlive(): void;
53
+ _markBorrowed(): void;
54
+ _markOwned(): void;
55
+ _markDisposed(): void;
56
+ _markBorrowedInstance(): void;
57
+ _markOwnedInstance(): void;
58
+ _markDisposedInstance(): void;
59
+ ownsNative(): boolean;
60
+ getObjectType(): ObjectType;
61
+ getName(): string;
62
+ getParent(): WzObject | null;
63
+ getFullPath(): string;
64
+ getWzFileParent(): WzFile | null;
65
+ getTopMostWzDirectory(): WzObject | null;
66
+ getTopMostWzImage(): WzObject | null;
67
+ at(name: string): WzObject | null;
68
+ setName(name: string): void;
69
+ remove(): void;
70
+ close(): void;
71
+ [Symbol.dispose](): void;
72
+ }
73
+ declare class WzFile extends WzObject {
74
+ private readonly disposeCallbacks;
75
+ static create(gameVersion: number, mapleVersion: MapleVersion): WzFile;
76
+ static fromBytes(name: string, bytes: Uint8Array, mapleVersion: MapleVersion): WzFile;
77
+ static fromBytes(name: string, bytes: Uint8Array, gameVersion: number, mapleVersion: MapleVersion): WzFile;
78
+ static fromBytes(name: string, bytes: Uint8Array, iv: NativeIv): WzFile;
79
+ static fromBlobSource(name: string, size: number, mapleVersion: MapleVersion, readRange: BlobReadRangeCallback): WzFile;
80
+ static fromBlobSource(name: string, size: number, gameVersion: number, mapleVersion: MapleVersion, readRange: BlobReadRangeCallback): WzFile;
81
+ static fromBlobSource(name: string, size: number, iv: NativeIv, readRange: BlobReadRangeCallback): WzFile;
82
+ constructor(path: string, mapleVersion?: MapleVersion);
83
+ constructor(path: string, gameVersion: number, mapleVersion: MapleVersion);
84
+ constructor(path: string, iv: NativeIv);
85
+ addDisposeCallback(callback: () => void): void;
86
+ parseWzFile(): ParseStatus;
87
+ saveToDisk(path: string): void;
88
+ getName(): string;
89
+ getFilePath(): string;
90
+ getVersion(): number;
91
+ getMapleVersion(): MapleVersion;
92
+ getWzDirectory(): WzDirectory | null;
93
+ is64BitWzFile(): boolean;
94
+ isUnloaded(): boolean;
95
+ getVersionHash(): number;
96
+ getObjectFromPath(path: string, checkFirstDirectoryName?: boolean): WzObject | null;
97
+ close(): void;
98
+ }
99
+ declare class WzDirectory extends WzObject {
100
+ getName(): string;
101
+ countImages(): number;
102
+ wzImages(): Array<WzImage | null>;
103
+ wzDirectories(): Array<WzDirectory | null>;
104
+ getImage(index: number): WzImage | null;
105
+ getImageByName(name: string): WzImage | null;
106
+ getDirectory(index: number): WzDirectory | null;
107
+ getDirectoryByName(name: string): WzDirectory | null;
108
+ createDirectory(name: string): WzDirectory;
109
+ createImage(name: string): WzImage;
110
+ removeDirectory(child: WzDirectory): void;
111
+ removeImage(child: WzImage): void;
112
+ getBlockSize(): number;
113
+ getChecksum(): number;
114
+ getOffset(): bigint;
115
+ }
116
+ declare class WzImage extends WzObject {
117
+ static fromFile(path: string, mapleVersion: MapleVersion): WzImage;
118
+ getName(): string;
119
+ isParsed(): boolean;
120
+ isChanged(): boolean;
121
+ getBlockSize(): number;
122
+ getChecksum(): number;
123
+ getOffset(): bigint;
124
+ isLuaWzImage(): boolean;
125
+ parseImage(): void;
126
+ wzProperties(): WzPropertyCollection;
127
+ getFromPath(path: string): WzImageProperty | null;
128
+ addProperty(prop: WzImageProperty): void;
129
+ removeProperty(prop: WzImageProperty): void;
130
+ clearProperties(): void;
131
+ }
132
+ declare class WzPropertyCollection extends Array<WzImageProperty> {
133
+ get(index: number): WzImageProperty | undefined;
134
+ }
135
+ declare class WzImageProperty extends WzObject {
136
+ getPropertyType(): PropertyType;
137
+ getName(): string;
138
+ wzProperties(): WzPropertyCollection;
139
+ getChild(index: number): WzImageProperty | null;
140
+ getChildByName(name: string): WzImageProperty | null;
141
+ getFromPath(path: string): WzImageProperty | null;
142
+ getLinkedWzImageProperty(): WzImageProperty | null;
143
+ getInt(): number;
144
+ getShort(): number;
145
+ getLong(): bigint;
146
+ getFloat(): number;
147
+ getDouble(): number;
148
+ getString(): string;
149
+ getBytes(): Uint8Array;
150
+ addProperty(child: WzImageProperty): void;
151
+ removeProperty(child: WzImageProperty): void;
152
+ clearProperties(): void;
153
+ close(): void;
154
+ }
155
+ declare class WzNullProperty extends WzImageProperty {
156
+ }
157
+ declare class WzShortProperty extends WzImageProperty {
158
+ getValue(): number;
159
+ setValue(value: number): void;
160
+ }
161
+ declare class WzIntProperty extends WzImageProperty {
162
+ getValue(): number;
163
+ setValue(value: number): void;
164
+ }
165
+ declare class WzLongProperty extends WzImageProperty {
166
+ getValue(): bigint;
167
+ setValue(value: bigint): void;
168
+ }
169
+ declare class WzFloatProperty extends WzImageProperty {
170
+ getValue(): number;
171
+ setValue(value: number): void;
172
+ }
173
+ declare class WzDoubleProperty extends WzImageProperty {
174
+ getValue(): number;
175
+ setValue(value: number): void;
176
+ }
177
+ declare class WzStringProperty extends WzImageProperty {
178
+ getValue(): string;
179
+ setValue(value: string): void;
180
+ }
181
+ declare class WzSubProperty extends WzImageProperty {
182
+ }
183
+ declare class WzCanvasProperty extends WzImageProperty {
184
+ getPngProperty(): WzPngProperty | null;
185
+ containsInlinkProperty(): boolean;
186
+ containsOutlinkProperty(): boolean;
187
+ getLinkedWzImageProperty(): WzImageProperty | null;
188
+ saveToFile(path: string): boolean;
189
+ }
190
+ declare class WzPngProperty extends WzImageProperty {
191
+ getWidth(): number;
192
+ getHeight(): number;
193
+ getFormat(): number;
194
+ isListWzUsed(): boolean;
195
+ getImage(): Uint8Array;
196
+ getCompressedBytes(): Uint8Array;
197
+ saveToFile(path: string): boolean;
198
+ }
199
+ declare class WzVectorProperty extends WzImageProperty {
200
+ getX(): number;
201
+ getY(): number;
202
+ }
203
+ declare class WzConvexProperty extends WzImageProperty {
204
+ }
205
+ declare class WzBinaryProperty extends WzImageProperty {
206
+ getBytes(): Uint8Array;
207
+ getWAVPlayback(): Uint8Array;
208
+ getLength(): number;
209
+ getFrequency(): number;
210
+ getType(): BinaryType;
211
+ isHeaderEncrypted(): boolean;
212
+ saveToFile(path: string): boolean;
213
+ }
214
+ declare class WzRawDataProperty extends WzImageProperty {
215
+ getBytes(): Uint8Array;
216
+ getRawType(): number;
217
+ }
218
+ declare class WzVideoProperty extends WzImageProperty {
219
+ getData(): Uint8Array;
220
+ }
221
+ declare class WzUOLProperty extends WzImageProperty {
222
+ getValue(): string;
223
+ setValue(value: string): void;
224
+ getLinkValue(): WzObject | null;
225
+ }
226
+ declare class WzLuaProperty extends WzImageProperty {
227
+ getData(): Uint8Array;
228
+ getString(): string;
229
+ }
230
+ declare class WzProperty {
231
+ static createNull(name: string): WzImageProperty;
232
+ static createShort(name: string, value: number): WzShortProperty;
233
+ static createInt(name: string, value: number): WzIntProperty;
234
+ static createLong(name: string, value: bigint): WzLongProperty;
235
+ static createFloat(name: string, value: number): WzFloatProperty;
236
+ static createDouble(name: string, value: number): WzDoubleProperty;
237
+ static createString(name: string, value: string): WzStringProperty;
238
+ static createSub(name: string): WzSubProperty;
239
+ static createVector(name: string, x: number, y: number): WzVectorProperty;
240
+ static createUol(name: string, value: string): WzUOLProperty;
241
+ static createCanvasFromPng(name: string, path: string): WzCanvasProperty;
242
+ }
243
+ declare const WzTool: Readonly<{
244
+ detectMapleVersion(path: string): DetectedMapleVersion;
245
+ getIvForVersion(version: MapleVersion): Uint8Array;
246
+ }>;
247
+
248
+ type NativeHandle = bigint;
249
+ type NativeIv = Uint8Array;
250
+ interface DetectedMapleVersion {
251
+ mapleVersion: MapleVersion;
252
+ version: number;
253
+ }
254
+ type BlobReadRangeCallback = (offset: number, length: number, destination?: Uint8Array) => Uint8Array | undefined;
255
+
256
+ type WzBindingType = 'native' | 'wasm';
257
+ declare function getWzBindingType(): WzBindingType;
258
+
259
+ interface WzInitOptions {
260
+ forceWasm?: boolean;
261
+ }
262
+ declare function init(options?: WzInitOptions): Promise<void>;
263
+ declare function init(wasmUrl: string | URL, options?: WzInitOptions): Promise<void>;
264
+
265
+ export { BinaryType, MapleVersion, ObjectType, ParseStatus, PropertyType, WzBinaryProperty, WzCanvasProperty, WzConvexProperty, WzDirectory, WzDoubleProperty, WzFile, WzFloatProperty, WzImage, WzImageProperty, WzIntProperty, WzLongProperty, WzLuaProperty, WzNullProperty, WzObject, WzPngProperty, WzProperty, WzPropertyCollection, WzRawDataProperty, WzShortProperty, WzStringProperty, WzSubProperty, WzTool, WzUOLProperty, WzVectorProperty, WzVideoProperty, getWzBindingType, init };
266
+ export type { DetectedMapleVersion, WzInitOptions };