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.
- package/LICENSE +21 -0
- package/README.md +165 -0
- package/binding.gyp +149 -0
- package/deps/tiny-aes/.github/workflows/c-cpp.yml +27 -0
- package/deps/tiny-aes/CMakeLists.txt +17 -0
- package/deps/tiny-aes/Makefile +61 -0
- package/deps/tiny-aes/README.md +83 -0
- package/deps/tiny-aes/aes.c +572 -0
- package/deps/tiny-aes/aes.h +91 -0
- package/deps/tiny-aes/aes.hpp +12 -0
- package/deps/tiny-aes/conanfile.py +73 -0
- package/deps/tiny-aes/library.json +19 -0
- package/deps/tiny-aes/library.properties +11 -0
- package/deps/tiny-aes/test.c +316 -0
- package/deps/tiny-aes/test.cpp +2 -0
- package/deps/tiny-aes/test_package/CMakeLists.txt +11 -0
- package/deps/tiny-aes/test_package/conanfile.py +17 -0
- package/deps/tiny-aes/unlicense.txt +24 -0
- package/deps/zlib/.cmake-format.yaml +245 -0
- package/deps/zlib/.github/workflows/c-std.yml +268 -0
- package/deps/zlib/.github/workflows/cmake.yml +147 -0
- package/deps/zlib/.github/workflows/configure.yml +146 -0
- package/deps/zlib/.github/workflows/contribs.yml +64 -0
- package/deps/zlib/.github/workflows/fuzz.yml +25 -0
- package/deps/zlib/.github/workflows/msys-cygwin.yml +92 -0
- package/deps/zlib/.github/workflows/others.yml +153 -0
- package/deps/zlib/BUILD.bazel +134 -0
- package/deps/zlib/CMakeLists.txt +310 -0
- package/deps/zlib/ChangeLog +1669 -0
- package/deps/zlib/FAQ +371 -0
- package/deps/zlib/INDEX +67 -0
- package/deps/zlib/LICENSE +22 -0
- package/deps/zlib/MODULE.bazel +9 -0
- package/deps/zlib/Makefile.in +426 -0
- package/deps/zlib/README +115 -0
- package/deps/zlib/README-cmake.md +79 -0
- package/deps/zlib/adler32.c +164 -0
- package/deps/zlib/amiga/Makefile.pup +69 -0
- package/deps/zlib/amiga/Makefile.sas +68 -0
- package/deps/zlib/compress.c +99 -0
- package/deps/zlib/configure +1078 -0
- package/deps/zlib/contrib/CMakeLists.txt +61 -0
- package/deps/zlib/contrib/README.contrib +57 -0
- package/deps/zlib/contrib/ada/CMakeLists.txt +217 -0
- package/deps/zlib/contrib/ada/buffer_demo.adb +106 -0
- package/deps/zlib/contrib/ada/cmake/Modules/CMakeADACompiler.cmake.in +23 -0
- package/deps/zlib/contrib/ada/cmake/Modules/CMakeADAInformation.cmake +133 -0
- package/deps/zlib/contrib/ada/cmake/Modules/CMakeDetermineADACompiler.cmake +33 -0
- package/deps/zlib/contrib/ada/cmake/Modules/CMakeTestADACompiler.cmake +46 -0
- package/deps/zlib/contrib/ada/cmake/binder_helper.cmake +47 -0
- package/deps/zlib/contrib/ada/cmake/compile_helper.cmake +32 -0
- package/deps/zlib/contrib/ada/cmake/exe_link_helper.cmake +53 -0
- package/deps/zlib/contrib/ada/cmake/shared_link_helper.cmake +52 -0
- package/deps/zlib/contrib/ada/cmake/static_link_helper.cmake +25 -0
- package/deps/zlib/contrib/ada/mtest.adb +156 -0
- package/deps/zlib/contrib/ada/read.adb +156 -0
- package/deps/zlib/contrib/ada/readme.txt +65 -0
- package/deps/zlib/contrib/ada/test.adb +463 -0
- package/deps/zlib/contrib/ada/zlib-streams.adb +225 -0
- package/deps/zlib/contrib/ada/zlib-streams.ads +114 -0
- package/deps/zlib/contrib/ada/zlib-thin.adb +142 -0
- package/deps/zlib/contrib/ada/zlib-thin.ads +450 -0
- package/deps/zlib/contrib/ada/zlib.adb +701 -0
- package/deps/zlib/contrib/ada/zlib.ads +328 -0
- package/deps/zlib/contrib/ada/zlib.gpr +20 -0
- package/deps/zlib/contrib/blast/CMakeLists.txt +166 -0
- package/deps/zlib/contrib/blast/Makefile +14 -0
- package/deps/zlib/contrib/blast/README +4 -0
- package/deps/zlib/contrib/blast/blast-test.c +42 -0
- package/deps/zlib/contrib/blast/blast.c +422 -0
- package/deps/zlib/contrib/blast/blast.h +84 -0
- package/deps/zlib/contrib/blast/blastConfig.cmake.in +18 -0
- package/deps/zlib/contrib/blast/test/CMakeLists.txt +193 -0
- package/deps/zlib/contrib/blast/test/add_subdirectory_exclude_test.cmake.in +27 -0
- package/deps/zlib/contrib/blast/test/add_subdirectory_test.cmake.in +25 -0
- package/deps/zlib/contrib/blast/test/find_package_no_components_test.cmake.in +24 -0
- package/deps/zlib/contrib/blast/test/find_package_test.cmake.in +24 -0
- package/deps/zlib/contrib/blast/test/find_package_wrong_components_test.cmake.in +24 -0
- package/deps/zlib/contrib/blast/test.pk +0 -0
- package/deps/zlib/contrib/blast/test.txt +1 -0
- package/deps/zlib/contrib/blast/tester.cmake +28 -0
- package/deps/zlib/contrib/crc32vx/CMakeLists.txt +67 -0
- package/deps/zlib/contrib/crc32vx/README +9 -0
- package/deps/zlib/contrib/crc32vx/crc32_vx.c +254 -0
- package/deps/zlib/contrib/crc32vx/crc32_vx_hooks.h +9 -0
- package/deps/zlib/contrib/delphi/ZLib.pas +557 -0
- package/deps/zlib/contrib/delphi/ZLibConst.pas +11 -0
- package/deps/zlib/contrib/delphi/readme.txt +76 -0
- package/deps/zlib/contrib/delphi/zlibd32.mak +99 -0
- package/deps/zlib/contrib/dotzlib/DotZLib/AssemblyInfo.cs +58 -0
- package/deps/zlib/contrib/dotzlib/DotZLib/ChecksumImpl.cs +202 -0
- package/deps/zlib/contrib/dotzlib/DotZLib/CircularBuffer.cs +83 -0
- package/deps/zlib/contrib/dotzlib/DotZLib/CodecBase.cs +198 -0
- package/deps/zlib/contrib/dotzlib/DotZLib/Deflater.cs +106 -0
- package/deps/zlib/contrib/dotzlib/DotZLib/DotZLib.cs +288 -0
- package/deps/zlib/contrib/dotzlib/DotZLib/DotZLib.csproj +141 -0
- package/deps/zlib/contrib/dotzlib/DotZLib/GZipStream.cs +301 -0
- package/deps/zlib/contrib/dotzlib/DotZLib/Inflater.cs +105 -0
- package/deps/zlib/contrib/dotzlib/DotZLib/UnitTests.cs +274 -0
- package/deps/zlib/contrib/dotzlib/DotZLib.build +33 -0
- package/deps/zlib/contrib/dotzlib/DotZLib.chm +0 -0
- package/deps/zlib/contrib/dotzlib/DotZLib.sln +21 -0
- package/deps/zlib/contrib/dotzlib/LICENSE_1_0.txt +23 -0
- package/deps/zlib/contrib/dotzlib/readme.txt +58 -0
- package/deps/zlib/contrib/gcc_gvmat64/CMakeLists.txt +19 -0
- package/deps/zlib/contrib/gcc_gvmat64/gvmat64.S +570 -0
- package/deps/zlib/contrib/infback9/CMakeLists.txt +19 -0
- package/deps/zlib/contrib/infback9/README +1 -0
- package/deps/zlib/contrib/infback9/infback9.c +603 -0
- package/deps/zlib/contrib/infback9/infback9.h +37 -0
- package/deps/zlib/contrib/infback9/inffix9.h +107 -0
- package/deps/zlib/contrib/infback9/inflate9.h +47 -0
- package/deps/zlib/contrib/infback9/inftree9.c +319 -0
- package/deps/zlib/contrib/infback9/inftree9.h +61 -0
- package/deps/zlib/contrib/iostream/test.cpp +24 -0
- package/deps/zlib/contrib/iostream/zfstream.cpp +329 -0
- package/deps/zlib/contrib/iostream/zfstream.h +128 -0
- package/deps/zlib/contrib/iostream2/zstream.h +306 -0
- package/deps/zlib/contrib/iostream2/zstream_test.cpp +25 -0
- package/deps/zlib/contrib/iostream3/CMakeLists.txt +200 -0
- package/deps/zlib/contrib/iostream3/README +35 -0
- package/deps/zlib/contrib/iostream3/TODO +17 -0
- package/deps/zlib/contrib/iostream3/iostream3Config.cmake.in +23 -0
- package/deps/zlib/contrib/iostream3/test/CMakeLists.txt +191 -0
- package/deps/zlib/contrib/iostream3/test/add_subdirectory_exclude_test.cmake.in +27 -0
- package/deps/zlib/contrib/iostream3/test/add_subdirectory_test.cmake.in +25 -0
- package/deps/zlib/contrib/iostream3/test/find_package_no_components_test.cmake.in +24 -0
- package/deps/zlib/contrib/iostream3/test/find_package_test.cmake.in +24 -0
- package/deps/zlib/contrib/iostream3/test/find_package_wrong_components_test.cmake.in +24 -0
- package/deps/zlib/contrib/iostream3/test.cc +50 -0
- package/deps/zlib/contrib/iostream3/zfstream.cc +479 -0
- package/deps/zlib/contrib/iostream3/zfstream.h +466 -0
- package/deps/zlib/contrib/minizip/CMakeLists.txt +387 -0
- package/deps/zlib/contrib/minizip/LICENSE.Info-Zip +58 -0
- package/deps/zlib/contrib/minizip/Makefile +33 -0
- package/deps/zlib/contrib/minizip/Makefile.am +45 -0
- package/deps/zlib/contrib/minizip/MiniZip64_Changes.txt +6 -0
- package/deps/zlib/contrib/minizip/MiniZip64_info.txt +69 -0
- package/deps/zlib/contrib/minizip/configure.ac +32 -0
- package/deps/zlib/contrib/minizip/crypt.h +125 -0
- package/deps/zlib/contrib/minizip/ints.h +57 -0
- package/deps/zlib/contrib/minizip/ioapi.c +231 -0
- package/deps/zlib/contrib/minizip/ioapi.h +183 -0
- package/deps/zlib/contrib/minizip/iowin32.c +447 -0
- package/deps/zlib/contrib/minizip/iowin32.h +27 -0
- package/deps/zlib/contrib/minizip/make_vms.com +25 -0
- package/deps/zlib/contrib/minizip/miniunz.c +647 -0
- package/deps/zlib/contrib/minizip/miniunzip.1 +63 -0
- package/deps/zlib/contrib/minizip/minizip.1 +46 -0
- package/deps/zlib/contrib/minizip/minizip.c +511 -0
- package/deps/zlib/contrib/minizip/minizip.pc.in +13 -0
- package/deps/zlib/contrib/minizip/minizip.pc.txt +13 -0
- package/deps/zlib/contrib/minizip/minizipConfig.cmake.in +27 -0
- package/deps/zlib/contrib/minizip/mztools.c +294 -0
- package/deps/zlib/contrib/minizip/mztools.h +37 -0
- package/deps/zlib/contrib/minizip/skipset.h +366 -0
- package/deps/zlib/contrib/minizip/test/CMakeLists.txt +176 -0
- package/deps/zlib/contrib/minizip/test/add_subdirectory_exclude_test.cmake.in +29 -0
- package/deps/zlib/contrib/minizip/test/add_subdirectory_test.cmake.in +28 -0
- package/deps/zlib/contrib/minizip/test/find_package_no_components_test.cmake.in +26 -0
- package/deps/zlib/contrib/minizip/test/find_package_test.cmake.in +26 -0
- package/deps/zlib/contrib/minizip/test/find_package_wrong_components_test.cmake.in +26 -0
- package/deps/zlib/contrib/minizip/test/test_helper.cm +32 -0
- package/deps/zlib/contrib/minizip/unzip.c +1984 -0
- package/deps/zlib/contrib/minizip/unzip.h +442 -0
- package/deps/zlib/contrib/minizip/zip.c +2246 -0
- package/deps/zlib/contrib/minizip/zip.h +371 -0
- package/deps/zlib/contrib/nuget/nuget.csproj +45 -0
- package/deps/zlib/contrib/nuget/nuget.sln +22 -0
- package/deps/zlib/contrib/pascal/example.pas +599 -0
- package/deps/zlib/contrib/pascal/readme.txt +76 -0
- package/deps/zlib/contrib/pascal/zlibd32.mak +99 -0
- package/deps/zlib/contrib/pascal/zlibpas.pas +276 -0
- package/deps/zlib/contrib/puff/CMakeLists.txt +154 -0
- package/deps/zlib/contrib/puff/Makefile +42 -0
- package/deps/zlib/contrib/puff/README +63 -0
- package/deps/zlib/contrib/puff/bin-writer.c +26 -0
- package/deps/zlib/contrib/puff/puff.c +840 -0
- package/deps/zlib/contrib/puff/puff.h +35 -0
- package/deps/zlib/contrib/puff/puffConfig.cmake.in +18 -0
- package/deps/zlib/contrib/puff/pufftest.c +168 -0
- package/deps/zlib/contrib/puff/test/CMakeLists.txt +262 -0
- package/deps/zlib/contrib/puff/test/add_subdirectory_exclude_test.cmake.in +26 -0
- package/deps/zlib/contrib/puff/test/add_subdirectory_test.cmake.in +25 -0
- package/deps/zlib/contrib/puff/test/find_package_no_components_test.cmake.in +24 -0
- package/deps/zlib/contrib/puff/test/find_package_test.cmake.in +24 -0
- package/deps/zlib/contrib/puff/test/find_package_wrong_components_test.cmake.in +24 -0
- package/deps/zlib/contrib/puff/test/tester-cov.cmake +58 -0
- package/deps/zlib/contrib/puff/test/tester.cmake +16 -0
- package/deps/zlib/contrib/puff/zeros.raw +0 -0
- package/deps/zlib/contrib/testzlib/CMakeLists.txt +44 -0
- package/deps/zlib/contrib/testzlib/testzlib.c +275 -0
- package/deps/zlib/contrib/testzlib/testzlib.txt +10 -0
- package/deps/zlib/contrib/vstudio/readme.txt +22 -0
- package/deps/zlib/contrib/zlib1-dll/CMakeLists.txt +196 -0
- package/deps/zlib/contrib/zlib1-dll/readme.txt +21 -0
- package/deps/zlib/crc32.c +983 -0
- package/deps/zlib/crc32.h +9446 -0
- package/deps/zlib/deflate.c +2185 -0
- package/deps/zlib/deflate.h +383 -0
- package/deps/zlib/doc/algorithm.txt +209 -0
- package/deps/zlib/doc/crc-doc.1.0.pdf +0 -0
- package/deps/zlib/doc/rfc1950.txt +619 -0
- package/deps/zlib/doc/rfc1951.txt +955 -0
- package/deps/zlib/doc/rfc1952.txt +675 -0
- package/deps/zlib/doc/txtvsbin.txt +107 -0
- package/deps/zlib/examples/README.examples +54 -0
- package/deps/zlib/examples/enough.c +597 -0
- package/deps/zlib/examples/fitblk.c +233 -0
- package/deps/zlib/examples/gun.c +702 -0
- package/deps/zlib/examples/gzappend.c +504 -0
- package/deps/zlib/examples/gzjoin.c +449 -0
- package/deps/zlib/examples/gzlog.c +1061 -0
- package/deps/zlib/examples/gzlog.h +91 -0
- package/deps/zlib/examples/gznorm.c +474 -0
- package/deps/zlib/examples/zlib_how.html +550 -0
- package/deps/zlib/examples/zpipe.c +206 -0
- package/deps/zlib/examples/zran.c +546 -0
- package/deps/zlib/examples/zran.h +53 -0
- package/deps/zlib/gzclose.c +23 -0
- package/deps/zlib/gzguts.h +216 -0
- package/deps/zlib/gzlib.c +609 -0
- package/deps/zlib/gzread.c +668 -0
- package/deps/zlib/gzwrite.c +700 -0
- package/deps/zlib/infback.c +581 -0
- package/deps/zlib/inffast.c +321 -0
- package/deps/zlib/inffast.h +11 -0
- package/deps/zlib/inffixed.h +94 -0
- package/deps/zlib/inflate.c +1413 -0
- package/deps/zlib/inflate.h +126 -0
- package/deps/zlib/inftrees.c +424 -0
- package/deps/zlib/inftrees.h +64 -0
- package/deps/zlib/make_vms.com +867 -0
- package/deps/zlib/msdos/Makefile.bor +115 -0
- package/deps/zlib/msdos/Makefile.dj2 +104 -0
- package/deps/zlib/msdos/Makefile.emx +69 -0
- package/deps/zlib/msdos/Makefile.msc +112 -0
- package/deps/zlib/msdos/Makefile.tc +100 -0
- package/deps/zlib/os400/README400 +48 -0
- package/deps/zlib/os400/bndsrc +144 -0
- package/deps/zlib/os400/make.sh +383 -0
- package/deps/zlib/os400/zlibfixed.rpgle +578 -0
- package/deps/zlib/os400/zlibfree.rpgle +634 -0
- package/deps/zlib/qnx/package.qpg +141 -0
- package/deps/zlib/test/CMakeLists.txt +318 -0
- package/deps/zlib/test/add_subdirectory_exclude_test.cmake.in +29 -0
- package/deps/zlib/test/add_subdirectory_test.cmake.in +28 -0
- package/deps/zlib/test/example.c +552 -0
- package/deps/zlib/test/find_package_no_components_test.cmake.in +27 -0
- package/deps/zlib/test/find_package_test.cmake.in +27 -0
- package/deps/zlib/test/find_package_wrong_components_test.cmake.in +27 -0
- package/deps/zlib/test/infcover.c +672 -0
- package/deps/zlib/test/minigzip.c +592 -0
- package/deps/zlib/treebuild.xml +116 -0
- package/deps/zlib/trees.c +1119 -0
- package/deps/zlib/trees.h +128 -0
- package/deps/zlib/uncompr.c +101 -0
- package/deps/zlib/watcom/watcom_f.mak +43 -0
- package/deps/zlib/watcom/watcom_l.mak +43 -0
- package/deps/zlib/win32/DLL_FAQ.txt +381 -0
- package/deps/zlib/win32/Makefile.bor +109 -0
- package/deps/zlib/win32/Makefile.gcc +177 -0
- package/deps/zlib/win32/Makefile.msc +159 -0
- package/deps/zlib/win32/README-WIN32.txt +103 -0
- package/deps/zlib/win32/VisualC.txt +3 -0
- package/deps/zlib/win32/zlib.def +104 -0
- package/deps/zlib/win32/zlib1.rc +37 -0
- package/deps/zlib/zconf.h.in +551 -0
- package/deps/zlib/zlib.3 +149 -0
- package/deps/zlib/zlib.3.pdf +0 -0
- package/deps/zlib/zlib.h +2057 -0
- package/deps/zlib/zlib.map +116 -0
- package/deps/zlib/zlib.pc.cmakein +14 -0
- package/deps/zlib/zlib.pc.in +14 -0
- package/deps/zlib/zlibConfig.cmake.in +18 -0
- package/deps/zlib/zutil.c +313 -0
- package/deps/zlib/zutil.h +331 -0
- package/dist/index.d.ts +266 -0
- package/dist/index.js +1146 -0
- package/dist/libwz.js +5632 -0
- package/dist/libwz.wasm +0 -0
- package/include/wz/CRC32.h +182 -0
- package/include/wz/PngUtility.h +72 -0
- package/include/wz/PortalType.h +124 -0
- package/include/wz/Properties/WzBinaryProperty.h +70 -0
- package/include/wz/Properties/WzCanvasProperty.h +55 -0
- package/include/wz/Properties/WzConvexProperty.h +34 -0
- package/include/wz/Properties/WzDoubleProperty.h +32 -0
- package/include/wz/Properties/WzFloatProperty.h +30 -0
- package/include/wz/Properties/WzIntProperty.h +30 -0
- package/include/wz/Properties/WzLongProperty.h +30 -0
- package/include/wz/Properties/WzLuaProperty.h +31 -0
- package/include/wz/Properties/WzNullProperty.h +15 -0
- package/include/wz/Properties/WzPngProperty.h +53 -0
- package/include/wz/Properties/WzRawDataProperty.h +46 -0
- package/include/wz/Properties/WzShortProperty.h +31 -0
- package/include/wz/Properties/WzStringProperty.h +32 -0
- package/include/wz/Properties/WzSubProperty.h +35 -0
- package/include/wz/Properties/WzUOLProperty.h +44 -0
- package/include/wz/Properties/WzVectorProperty.h +40 -0
- package/include/wz/Properties/WzVideoProperty.h +43 -0
- package/include/wz/Result.h +58 -0
- package/include/wz/Util/Defines.h +16 -0
- package/include/wz/Util/ListFileParser.h +20 -0
- package/include/wz/Util/WzBinaryReader.h +95 -0
- package/include/wz/Util/WzBinaryWriter.h +72 -0
- package/include/wz/Util/WzBlobDataSource.h +30 -0
- package/include/wz/Util/WzDataSource.h +49 -0
- package/include/wz/Util/WzKeyGenerator.h +28 -0
- package/include/wz/Util/WzMutableKey.h +39 -0
- package/include/wz/Util/WzPath.h +37 -0
- package/include/wz/Util/WzStream.h +86 -0
- package/include/wz/Util/WzTool.h +42 -0
- package/include/wz/WzAESConstant.h +17 -0
- package/include/wz/WzDirectory.h +97 -0
- package/include/wz/WzEnums.h +76 -0
- package/include/wz/WzFile.h +99 -0
- package/include/wz/WzHeader.h +47 -0
- package/include/wz/WzImage.h +97 -0
- package/include/wz/WzImageProperty.h +92 -0
- package/include/wz/WzObject.h +55 -0
- package/include/wz/WzPropertyCollection.h +115 -0
- package/include/wz/wz.h +41 -0
- package/include/wz/wz_api.h +432 -0
- package/package.json +93 -0
- package/src/PngUtility.cpp +328 -0
- package/src/Properties/WzBinaryProperty.cpp +183 -0
- package/src/Properties/WzCanvasProperty.cpp +262 -0
- package/src/Properties/WzConvexProperty.cpp +159 -0
- package/src/Properties/WzDoubleProperty.cpp +12 -0
- package/src/Properties/WzFloatProperty.cpp +17 -0
- package/src/Properties/WzIntProperty.cpp +12 -0
- package/src/Properties/WzLongProperty.cpp +12 -0
- package/src/Properties/WzLuaProperty.cpp +37 -0
- package/src/Properties/WzNullProperty.cpp +11 -0
- package/src/Properties/WzPngProperty.cpp +637 -0
- package/src/Properties/WzRawDataProperty.cpp +116 -0
- package/src/Properties/WzShortProperty.cpp +12 -0
- package/src/Properties/WzStringProperty.cpp +44 -0
- package/src/Properties/WzSubProperty.cpp +129 -0
- package/src/Properties/WzUOLProperty.cpp +136 -0
- package/src/Properties/WzVectorProperty.cpp +22 -0
- package/src/Properties/WzVideoProperty.cpp +115 -0
- package/src/Util/ListFileParser.cpp +48 -0
- package/src/Util/WzBinaryReader.cpp +368 -0
- package/src/Util/WzBinaryWriter.cpp +305 -0
- package/src/Util/WzBlobDataSource.cpp +47 -0
- package/src/Util/WzDataSource.cpp +61 -0
- package/src/Util/WzKeyGenerator.cpp +43 -0
- package/src/Util/WzMutableKey.cpp +59 -0
- package/src/Util/WzStream.cpp +196 -0
- package/src/Util/WzTool.cpp +266 -0
- package/src/WzAESConstant.cpp +12 -0
- package/src/WzDirectory.cpp +669 -0
- package/src/WzEnums.cpp +20 -0
- package/src/WzFile.cpp +450 -0
- package/src/WzImage.cpp +350 -0
- package/src/WzImageProperty.cpp +469 -0
- package/src/WzObject.cpp +174 -0
- package/src/WzPropertyCollection.cpp +84 -0
- package/src/capi/wz_api.cpp +1996 -0
- package/src/node/binding.cpp +1776 -0
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
function(zlib_add_contrib_lib name description dir)
|
|
2
|
+
option(ZLIB_BUILD_${name} "Enable building of ${description}" OFF)
|
|
3
|
+
|
|
4
|
+
if(ZLIB_BUILD_${name})
|
|
5
|
+
if(NOT DEFINED ZLIB_${name}_BUILD_SHARED)
|
|
6
|
+
set(ZLIB_${name}_BUILD_SHARED ${ZLIB_BUILD_SHARED} CACHE BOOL "")
|
|
7
|
+
endif(NOT DEFINED ZLIB_${name}_BUILD_SHARED)
|
|
8
|
+
|
|
9
|
+
if(NOT DEFINED ZLIB_${name}_BUILD_STATIC)
|
|
10
|
+
set(ZLIB_${name}_BUILD_STATIC ${ZLIB_BUILD_STATIC} CACHE BOOL "")
|
|
11
|
+
endif(NOT DEFINED ZLIB_${name}_BUILD_STATIC)
|
|
12
|
+
|
|
13
|
+
if(NOT DEFINED ZLIB_${name}_BUILD_TESTING)
|
|
14
|
+
set(ZLIB_${name}_BUILD_TESTING ${ZLIB_BUILD_TESTING} CACHE BOOL "")
|
|
15
|
+
endif(NOT DEFINED ZLIB_${name}_BUILD_TESTING)
|
|
16
|
+
|
|
17
|
+
if(NOT DEFINED ZLIB_${name}_INSTALL)
|
|
18
|
+
set(ZLIB_${name}_INSTALL ${ZLIB_INSTALL} CACHE BOOL "")
|
|
19
|
+
endif(NOT DEFINED ZLIB_${name}_INSTALL)
|
|
20
|
+
|
|
21
|
+
add_subdirectory(${dir}/)
|
|
22
|
+
endif(ZLIB_BUILD_${name})
|
|
23
|
+
endfunction(zlib_add_contrib_lib name description dir)
|
|
24
|
+
|
|
25
|
+
function(zlib_add_contrib_feature name description dir)
|
|
26
|
+
if(ARGC EQUAL 4)
|
|
27
|
+
set(default_on ${ARGV3})
|
|
28
|
+
else()
|
|
29
|
+
set(default_on Off)
|
|
30
|
+
endif()
|
|
31
|
+
|
|
32
|
+
option(ZLIB_WITH_${name}
|
|
33
|
+
"Enable build ${description}"
|
|
34
|
+
${default_on})
|
|
35
|
+
|
|
36
|
+
if(ZLIB_WITH_${name})
|
|
37
|
+
add_subdirectory(${dir}/)
|
|
38
|
+
endif(ZLIB_WITH_${name})
|
|
39
|
+
endfunction(zlib_add_contrib_feature name description dir)
|
|
40
|
+
|
|
41
|
+
zlib_add_contrib_feature("GVMAT64"
|
|
42
|
+
"of an optimized longest_match for 32 bits x86_64"
|
|
43
|
+
gcc_gvmat64)
|
|
44
|
+
|
|
45
|
+
zlib_add_contrib_feature(INFBACK9 "with support for method 9 deflate" infback9)
|
|
46
|
+
zlib_add_contrib_feature(CRC32VX "with S390X-CRC32VX implementation" crc32vx)
|
|
47
|
+
zlib_add_contrib_lib(ADA "Ada bindings" ada)
|
|
48
|
+
zlib_add_contrib_lib(BLAST "blast binary" blast)
|
|
49
|
+
zlib_add_contrib_lib(IOSTREAM3 "IOStream C++ bindings V3" iostream3)
|
|
50
|
+
zlib_add_contrib_lib(MINIZIP "minizip library" minizip)
|
|
51
|
+
zlib_add_contrib_lib(PUFF "puff decompress library" puff)
|
|
52
|
+
|
|
53
|
+
if(WIN32)
|
|
54
|
+
zlib_add_contrib_lib(TESTZLIB "testzlib binary" testzlib)
|
|
55
|
+
|
|
56
|
+
if (ZLIB_BUILD_ZLIB1_DLL)
|
|
57
|
+
add_subdirectory(zlib1-dll/)
|
|
58
|
+
endif (ZLIB_BUILD_ZLIB1_DLL)
|
|
59
|
+
|
|
60
|
+
option(ZLIB_BUILD_ZLIB1_DLL "Build the legacy zlib + minizip DLL" OFF)
|
|
61
|
+
endif(WIN32)
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
All files under this contrib directory are UNSUPPORTED. They were
|
|
2
|
+
provided by users of zlib and were not tested by the authors of zlib.
|
|
3
|
+
Use at your own risk. Please contact the authors of the contributions
|
|
4
|
+
for help about these, not the zlib authors. Thanks.
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
ada/ by Dmitriy Anisimkov <anisimkov@yahoo.com>
|
|
8
|
+
Support for Ada
|
|
9
|
+
See https://zlib-ada.sourceforge.net/
|
|
10
|
+
|
|
11
|
+
blast/ by Mark Adler <madler@alumni.caltech.edu>
|
|
12
|
+
Decompressor for output of PKWare Data Compression Library (DCL)
|
|
13
|
+
|
|
14
|
+
delphi/ by Cosmin Truta <cosmint@cs.ubbcluj.ro>
|
|
15
|
+
Support for Delphi and C++ Builder
|
|
16
|
+
|
|
17
|
+
dotzlib/ by Henrik Ravn <henrik@ravn.com>
|
|
18
|
+
Support for Microsoft .Net and Visual C++ .Net
|
|
19
|
+
|
|
20
|
+
gcc_gvmat64/by Gilles Vollant <info@winimage.com>
|
|
21
|
+
GCC Version of x86 64-bit (AMD64 and Intel EM64t) code for x64
|
|
22
|
+
assembler to replace longest_match() and inflate_fast()
|
|
23
|
+
|
|
24
|
+
infback9/ by Mark Adler <madler@alumni.caltech.edu>
|
|
25
|
+
Unsupported diffs to infback to decode the deflate64 format
|
|
26
|
+
|
|
27
|
+
iostream/ by Kevin Ruland <kevin@rodin.wustl.edu>
|
|
28
|
+
A C++ I/O streams interface to the zlib gz* functions
|
|
29
|
+
|
|
30
|
+
iostream2/ by Tyge Løvset <Tyge.Lovset@cmr.no>
|
|
31
|
+
Another C++ I/O streams interface
|
|
32
|
+
|
|
33
|
+
iostream3/ by Ludwig Schwardt <schwardt@sun.ac.za>
|
|
34
|
+
and Kevin Ruland <kevin@rodin.wustl.edu>
|
|
35
|
+
Yet another C++ I/O streams interface
|
|
36
|
+
|
|
37
|
+
minizip/ by Gilles Vollant <info@winimage.com>
|
|
38
|
+
Mini zip and unzip based on zlib
|
|
39
|
+
Includes Zip64 support by Mathias Svensson <mathias@result42.com>
|
|
40
|
+
See https://www.winimage.com/zLibDll/minizip.html
|
|
41
|
+
|
|
42
|
+
pascal/ by Bob Dellaca <bobdl@xtra.co.nz> et al.
|
|
43
|
+
Support for Pascal
|
|
44
|
+
|
|
45
|
+
puff/ by Mark Adler <madler@alumni.caltech.edu>
|
|
46
|
+
Small, low memory usage inflate. Also serves to provide an
|
|
47
|
+
unambiguous description of the deflate format.
|
|
48
|
+
|
|
49
|
+
crc32vx/ by Ilya Leoshkevich <iii@linux.ibm.com>
|
|
50
|
+
Hardware-accelerated CRC32 on IBM Z with Z13 VX extension.
|
|
51
|
+
|
|
52
|
+
testzlib/ by Gilles Vollant <info@winimage.com>
|
|
53
|
+
Example of the use of zlib
|
|
54
|
+
|
|
55
|
+
zlib1-dll/
|
|
56
|
+
by @Vollstrecker on github.com
|
|
57
|
+
Build the legacy zlib1.dll with zlib and minizip.
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
cmake_minimum_required(VERSION 3.12...3.31)
|
|
2
|
+
|
|
3
|
+
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules")
|
|
4
|
+
|
|
5
|
+
project(
|
|
6
|
+
zlibAda
|
|
7
|
+
VERSION 1.0.0
|
|
8
|
+
LANGUAGES C ADA
|
|
9
|
+
DESCRIPTION "A library for creating zipfiles based in zlib"
|
|
10
|
+
HOMEPAGE_URL "https://www.zlib.net")
|
|
11
|
+
|
|
12
|
+
option(ZLIB_ADA_BUILD_SHARED "Enable building ada bindings shared library" ON)
|
|
13
|
+
option(ZLIB_ADA_BUILD_STATIC "Enable building ada bindings static library" ON)
|
|
14
|
+
option(ZLIB_ADA_BUILD_TESTING "Enable building tests for ada bindings library" ON)
|
|
15
|
+
|
|
16
|
+
if(WIN32 OR CYGWIN)
|
|
17
|
+
set(zlib_Ada_static_suffix "s")
|
|
18
|
+
set(CMAKE_DEBUG_POSTFIX "d")
|
|
19
|
+
endif(WIN32 OR CYGWIN)
|
|
20
|
+
|
|
21
|
+
if(NOT DEFINED ZLIB_BUILD_ADA)
|
|
22
|
+
if(ZLIB_ADA_BUILD_SHARED)
|
|
23
|
+
list(APPEND REQUIRED_COMPONENTS "shared")
|
|
24
|
+
endif(ZLIB_ADA_BUILD_SHARED)
|
|
25
|
+
|
|
26
|
+
if(ZLIB_ADA_BUILD_STATIC)
|
|
27
|
+
list(APPEND REQUIRED_COMPONENTS "static")
|
|
28
|
+
endif(ZLIB_ADA_BUILD_STATIC)
|
|
29
|
+
|
|
30
|
+
find_package(ZLIB REQUIRED COMPONENTS ${REQUIRED_COMPONENTS} CONFIG)
|
|
31
|
+
endif(NOT DEFINED ZLIB_BUILD_ADA)
|
|
32
|
+
|
|
33
|
+
function(ZLIB_ADA_findTestEnv testName)
|
|
34
|
+
set(testEnv "PATH=")
|
|
35
|
+
|
|
36
|
+
if(MSVC OR MINGW)
|
|
37
|
+
set(separator "\\\;")
|
|
38
|
+
else()
|
|
39
|
+
set(separator ":")
|
|
40
|
+
endif()
|
|
41
|
+
|
|
42
|
+
string(APPEND testEnv "$<TARGET_FILE_DIR:ZLIB::ZLIB>${separator}")
|
|
43
|
+
string(APPEND testEnv "$ENV{PATH}")
|
|
44
|
+
|
|
45
|
+
set_tests_properties(${testName} PROPERTIES ENVIRONMENT "${testEnv}")
|
|
46
|
+
endfunction(ZLIB_ADA_findTestEnv testName)
|
|
47
|
+
|
|
48
|
+
if(ZLIB_ADA_BUILD_SHARED)
|
|
49
|
+
ada_add_library(zlib_ada_Ada SHARED
|
|
50
|
+
zlib-thin.adb
|
|
51
|
+
zlib.adb)
|
|
52
|
+
|
|
53
|
+
set_target_properties(zlib_ada_Ada
|
|
54
|
+
PROPERTIES OUTPUT_NAME zlib-ada)
|
|
55
|
+
|
|
56
|
+
target_link_libraries(zlib_ada_Ada
|
|
57
|
+
INTERFACE ZLIB::ZLIB)
|
|
58
|
+
|
|
59
|
+
ada_add_library(zlib_ada_streams SHARED
|
|
60
|
+
zlib-streams.adb)
|
|
61
|
+
|
|
62
|
+
target_link_libraries(zlib_ada_streams
|
|
63
|
+
PUBLIC
|
|
64
|
+
zlib_ada_Ada)
|
|
65
|
+
|
|
66
|
+
ada_find_ali(zlib_ada_streams)
|
|
67
|
+
|
|
68
|
+
if(ZLIB_ADA_BUILD_TESTING)
|
|
69
|
+
enable_testing()
|
|
70
|
+
ada_add_executable(zlib_ada_test test.adb)
|
|
71
|
+
|
|
72
|
+
target_link_libraries(zlib_ada_test
|
|
73
|
+
PRIVATE
|
|
74
|
+
zlib_ada_Ada
|
|
75
|
+
zlib_ada_streams)
|
|
76
|
+
|
|
77
|
+
ada_find_ali(zlib_ada_test)
|
|
78
|
+
|
|
79
|
+
add_test(NAME zlib_ada_ada-test COMMAND zlib_ada_test)
|
|
80
|
+
set_tests_properties(zlib_ada_ada-test PROPERTIES FIXTURES_REQUIRED zlib_ada_cleanup)
|
|
81
|
+
|
|
82
|
+
if(MSVC
|
|
83
|
+
OR MSYS
|
|
84
|
+
OR MINGW
|
|
85
|
+
OR CYGWIN)
|
|
86
|
+
zlib_ada_findtestenv(zlib_ada_ada-test)
|
|
87
|
+
endif(
|
|
88
|
+
MSVC
|
|
89
|
+
OR MSYS
|
|
90
|
+
OR MINGW
|
|
91
|
+
OR CYGWIN)
|
|
92
|
+
|
|
93
|
+
ada_add_executable(zlib_ada_buffer_demo buffer_demo.adb)
|
|
94
|
+
|
|
95
|
+
target_link_libraries(zlib_ada_buffer_demo
|
|
96
|
+
PRIVATE
|
|
97
|
+
zlib_ada_Ada)
|
|
98
|
+
|
|
99
|
+
ada_find_ali(zlib_ada_buffer_demo)
|
|
100
|
+
|
|
101
|
+
add_test(NAME zlib_ada_buffer-demo COMMAND zlib_ada_buffer_demo)
|
|
102
|
+
|
|
103
|
+
if(MSVC
|
|
104
|
+
OR MSYS
|
|
105
|
+
OR MINGW
|
|
106
|
+
OR CYGWIN)
|
|
107
|
+
zlib_ada_findtestenv(zlib_ada_buffer-demo)
|
|
108
|
+
endif(
|
|
109
|
+
MSVC
|
|
110
|
+
OR MSYS
|
|
111
|
+
OR MINGW
|
|
112
|
+
OR CYGWIN)
|
|
113
|
+
|
|
114
|
+
ada_add_executable(zlib_ada_mtest mtest.adb)
|
|
115
|
+
|
|
116
|
+
target_link_libraries(zlib_ada_mtest
|
|
117
|
+
PRIVATE
|
|
118
|
+
zlib_ada_Ada)
|
|
119
|
+
|
|
120
|
+
ada_find_ali(zlib_ada_mtest)
|
|
121
|
+
|
|
122
|
+
#Not adding test as this is an endless-loop
|
|
123
|
+
|
|
124
|
+
ada_add_executable(zlib_ada_read read.adb)
|
|
125
|
+
|
|
126
|
+
target_link_libraries(zlib_ada_read
|
|
127
|
+
PRIVATE
|
|
128
|
+
zlib_ada_Ada)
|
|
129
|
+
|
|
130
|
+
ada_find_ali(zlib_ada_read)
|
|
131
|
+
|
|
132
|
+
add_test(NAME zlib_ada_read COMMAND zlib_ada_read)
|
|
133
|
+
|
|
134
|
+
if(MSVC
|
|
135
|
+
OR MSYS
|
|
136
|
+
OR MINGW
|
|
137
|
+
OR CYGWIN)
|
|
138
|
+
zlib_ada_findtestenv(zlib_ada_read)
|
|
139
|
+
endif(
|
|
140
|
+
MSVC
|
|
141
|
+
OR MSYS
|
|
142
|
+
OR MINGW
|
|
143
|
+
OR CYGWIN)
|
|
144
|
+
endif(ZLIB_ADA_BUILD_TESTING)
|
|
145
|
+
endif(ZLIB_ADA_BUILD_SHARED)
|
|
146
|
+
|
|
147
|
+
if(ZLIB_ADA_BUILD_STATIC)
|
|
148
|
+
ada_add_library(zlib_ada_AdaStatic STATIC
|
|
149
|
+
zlib-thin.adb
|
|
150
|
+
zlib.adb)
|
|
151
|
+
|
|
152
|
+
target_link_libraries(zlib_ada_AdaStatic
|
|
153
|
+
INTERFACE ZLIB::ZLIBSTATIC)
|
|
154
|
+
|
|
155
|
+
set_target_properties(zlib_ada_AdaStatic
|
|
156
|
+
PROPERTIES OUTPUT_NAME zlib-ada${zlib_Ada_static_suffix})
|
|
157
|
+
|
|
158
|
+
ada_add_library(zlib_ada_streamsStatic STATIC
|
|
159
|
+
zlib-streams.adb)
|
|
160
|
+
|
|
161
|
+
target_link_libraries(zlib_ada_streamsStatic
|
|
162
|
+
PUBLIC
|
|
163
|
+
zlib_ada_AdaStatic)
|
|
164
|
+
|
|
165
|
+
ada_find_ali(zlib_ada_streamsStatic)
|
|
166
|
+
|
|
167
|
+
if(ZLIB_ADA_BUILD_TESTING)
|
|
168
|
+
enable_testing()
|
|
169
|
+
ada_add_executable(zlib_ada_testStatic test.adb)
|
|
170
|
+
|
|
171
|
+
target_link_libraries(zlib_ada_testStatic
|
|
172
|
+
PRIVATE
|
|
173
|
+
zlib_ada_AdaStatic
|
|
174
|
+
zlib_ada_streamsStatic)
|
|
175
|
+
|
|
176
|
+
ada_find_ali(zlib_ada_testStatic)
|
|
177
|
+
|
|
178
|
+
add_test(NAME zlib_ada_testStatic COMMAND zlib_ada_testStatic)
|
|
179
|
+
set_tests_properties(zlib_ada_testStatic PROPERTIES FIXTURES_REQUIRED zlib_ada_cleanup)
|
|
180
|
+
|
|
181
|
+
ada_add_executable(zlib_ada_buffer-demoStatic buffer_demo.adb)
|
|
182
|
+
|
|
183
|
+
target_link_libraries(zlib_ada_buffer-demoStatic
|
|
184
|
+
PRIVATE
|
|
185
|
+
zlib_ada_AdaStatic)
|
|
186
|
+
|
|
187
|
+
ada_find_ali(zlib_ada_buffer-demoStatic)
|
|
188
|
+
|
|
189
|
+
add_test(NAME zlib_ada_buffer-demoStatic COMMAND zlib_ada_buffer-demoStatic)
|
|
190
|
+
|
|
191
|
+
ada_add_executable(zlib_ada_mtestStatic mtest.adb)
|
|
192
|
+
|
|
193
|
+
target_link_libraries(zlib_ada_mtestStatic
|
|
194
|
+
PRIVATE
|
|
195
|
+
zlib_ada_AdaStatic)
|
|
196
|
+
|
|
197
|
+
ada_find_ali(zlib_ada_mtestStatic)
|
|
198
|
+
|
|
199
|
+
# Not adding test as this is an endless-loop
|
|
200
|
+
|
|
201
|
+
ada_add_executable(zlib_ada_readStatic read.adb)
|
|
202
|
+
|
|
203
|
+
target_link_libraries(zlib_ada_readStatic
|
|
204
|
+
PRIVATE
|
|
205
|
+
zlib_ada_AdaStatic)
|
|
206
|
+
|
|
207
|
+
ada_find_ali(zlib_ada_readStatic)
|
|
208
|
+
|
|
209
|
+
add_test(NAME zlib_ada_readStatic COMMAND zlib_ada_readStatic)
|
|
210
|
+
endif(ZLIB_ADA_BUILD_TESTING)
|
|
211
|
+
endif(ZLIB_ADA_BUILD_STATIC)
|
|
212
|
+
|
|
213
|
+
if(ZLIB_ADA_BUILD_TESTING)
|
|
214
|
+
add_test(NAME zlib_ada_cleanup COMMAND ${CMAKE_COMMAND} -E rm ${CMAKE_CURRENT_BINARY_DIR}/testzlib.in
|
|
215
|
+
${CMAKE_CURRENT_BINARY_DIR}/testzlib.out ${CMAKE_CURRENT_BINARY_DIR}/testzlib.zlb)
|
|
216
|
+
set_tests_properties(zlib_ada_cleanup PROPERTIES FIXTURES_CLEANUP zlib_ada_cleanup)
|
|
217
|
+
endif(ZLIB_ADA_BUILD_TESTING)
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
----------------------------------------------------------------
|
|
2
|
+
-- ZLib for Ada thick binding. --
|
|
3
|
+
-- --
|
|
4
|
+
-- Copyright (C) 2002-2004 Dmitriy Anisimkov --
|
|
5
|
+
-- --
|
|
6
|
+
-- Open source license information is in the zlib.ads file. --
|
|
7
|
+
----------------------------------------------------------------
|
|
8
|
+
--
|
|
9
|
+
-- $Id: buffer_demo.adb,v 1.3 2004/09/06 06:55:35 vagul Exp $
|
|
10
|
+
|
|
11
|
+
-- This demo program provided by Dr Steve Sangwine <sjs@essex.ac.uk>
|
|
12
|
+
--
|
|
13
|
+
-- Demonstration of a problem with Zlib-Ada (already fixed) when a buffer
|
|
14
|
+
-- of exactly the correct size is used for decompressed data, and the last
|
|
15
|
+
-- few bytes passed in to Zlib are checksum bytes.
|
|
16
|
+
|
|
17
|
+
-- This program compresses a string of text, and then decompresses the
|
|
18
|
+
-- compressed text into a buffer of the same size as the original text.
|
|
19
|
+
|
|
20
|
+
with Ada.Streams; use Ada.Streams;
|
|
21
|
+
with Ada.Text_IO;
|
|
22
|
+
|
|
23
|
+
with ZLib; use ZLib;
|
|
24
|
+
|
|
25
|
+
procedure Buffer_Demo is
|
|
26
|
+
EOL : Character renames ASCII.LF;
|
|
27
|
+
Text : constant String
|
|
28
|
+
:= "Four score and seven years ago our fathers brought forth," & EOL &
|
|
29
|
+
"upon this continent, a new nation, conceived in liberty," & EOL &
|
|
30
|
+
"and dedicated to the proposition that `all men are created equal'.";
|
|
31
|
+
|
|
32
|
+
Source : Stream_Element_Array (1 .. Text'Length);
|
|
33
|
+
for Source'Address use Text'Address;
|
|
34
|
+
|
|
35
|
+
begin
|
|
36
|
+
Ada.Text_IO.Put (Text);
|
|
37
|
+
Ada.Text_IO.New_Line;
|
|
38
|
+
Ada.Text_IO.Put_Line
|
|
39
|
+
("Uncompressed size : " & Positive'Image (Text'Length) & " bytes");
|
|
40
|
+
|
|
41
|
+
declare
|
|
42
|
+
Compressed_Data : Stream_Element_Array (1 .. Text'Length);
|
|
43
|
+
L : Stream_Element_Offset;
|
|
44
|
+
begin
|
|
45
|
+
Compress : declare
|
|
46
|
+
Compressor : Filter_Type;
|
|
47
|
+
I : Stream_Element_Offset;
|
|
48
|
+
begin
|
|
49
|
+
Deflate_Init (Compressor);
|
|
50
|
+
|
|
51
|
+
-- Compress the whole of T at once.
|
|
52
|
+
|
|
53
|
+
Translate (Compressor, Source, I, Compressed_Data, L, Finish);
|
|
54
|
+
pragma Assert (I = Source'Last);
|
|
55
|
+
|
|
56
|
+
Close (Compressor);
|
|
57
|
+
|
|
58
|
+
Ada.Text_IO.Put_Line
|
|
59
|
+
("Compressed size : "
|
|
60
|
+
& Stream_Element_Offset'Image (L) & " bytes");
|
|
61
|
+
end Compress;
|
|
62
|
+
|
|
63
|
+
-- Now we decompress the data, passing short blocks of data to Zlib
|
|
64
|
+
-- (because this demonstrates the problem - the last block passed will
|
|
65
|
+
-- contain checksum information and there will be no output, only a
|
|
66
|
+
-- check inside Zlib that the checksum is correct).
|
|
67
|
+
|
|
68
|
+
Decompress : declare
|
|
69
|
+
Decompressor : Filter_Type;
|
|
70
|
+
|
|
71
|
+
Uncompressed_Data : Stream_Element_Array (1 .. Text'Length);
|
|
72
|
+
|
|
73
|
+
Block_Size : constant := 4;
|
|
74
|
+
-- This makes sure that the last block contains
|
|
75
|
+
-- only Adler checksum data.
|
|
76
|
+
|
|
77
|
+
P : Stream_Element_Offset := Compressed_Data'First - 1;
|
|
78
|
+
O : Stream_Element_Offset;
|
|
79
|
+
begin
|
|
80
|
+
Inflate_Init (Decompressor);
|
|
81
|
+
|
|
82
|
+
loop
|
|
83
|
+
Translate
|
|
84
|
+
(Decompressor,
|
|
85
|
+
Compressed_Data
|
|
86
|
+
(P + 1 .. Stream_Element_Offset'Min (P + Block_Size, L)),
|
|
87
|
+
P,
|
|
88
|
+
Uncompressed_Data
|
|
89
|
+
(Total_Out (Decompressor) + 1 .. Uncompressed_Data'Last),
|
|
90
|
+
O,
|
|
91
|
+
No_Flush);
|
|
92
|
+
|
|
93
|
+
Ada.Text_IO.Put_Line
|
|
94
|
+
("Total in : " & Count'Image (Total_In (Decompressor)) &
|
|
95
|
+
", out : " & Count'Image (Total_Out (Decompressor)));
|
|
96
|
+
|
|
97
|
+
exit when P = L;
|
|
98
|
+
end loop;
|
|
99
|
+
|
|
100
|
+
Ada.Text_IO.New_Line;
|
|
101
|
+
Ada.Text_IO.Put_Line
|
|
102
|
+
("Decompressed text matches original text : "
|
|
103
|
+
& Boolean'Image (Uncompressed_Data = Source));
|
|
104
|
+
end Decompress;
|
|
105
|
+
end;
|
|
106
|
+
end Buffer_Demo;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
set(CMAKE_ADA_COMPILER "@CMAKE_ADA_COMPILER@")
|
|
2
|
+
set(CMAKE_ADA_COMPILER_ARG1 "@CMAKE_ADA_COMPILER_ARG1@")
|
|
3
|
+
set(CMAKE_ADA_COMPILER_ID "@CMAKE_ADA_COMPILER_ID@")
|
|
4
|
+
set(CMAKE_ADA_COMPILER_VERSION "@CMAKE_ADA_COMPILER_VERSION@")
|
|
5
|
+
set(CMAKE_ADA_PLATFORM_ID "@CMAKE_ADA_PLATFORM_ID@")
|
|
6
|
+
set(CMAKE_AR "@CMAKE_AR@")
|
|
7
|
+
#set(CMAKE_RANLIB "@CMAKE_RANLIB@")
|
|
8
|
+
#set(CMAKE_LINKER "@CMAKE_LINKER@")
|
|
9
|
+
set(CMAKE_ADA_COMPILER_LOADED TRUE)
|
|
10
|
+
set(CMAKE_ADA_COMPILER_WORKS @CMAKE_ADA_COMPILER_WORKS@)
|
|
11
|
+
#set(CMAKE_ADA_ABI_COMPILED @CMAKE_ADA_ABI_COMPILED@)
|
|
12
|
+
|
|
13
|
+
set(CMAKE_ADA_COMPILER_ENV_VAR "ADA")
|
|
14
|
+
|
|
15
|
+
set(CMAKE_ADA_COMPILER_ID_RUN TRUE)
|
|
16
|
+
set(CMAKE_ADA_SOURCE_FILE_EXTENSIONS adb;ADB)
|
|
17
|
+
set(CMAKE_ADA_IGNORE_EXTENSIONS ;o;O;obj;OBJ;ali)
|
|
18
|
+
|
|
19
|
+
set(CMAKE_ADA_BINDER_HELPER "@CMAKE_ADA_BINDER_HELPER@")
|
|
20
|
+
set(CMAKE_ADA_COMPILER_HELPER "@CMAKE_ADA_COMPILER_HELPER@")
|
|
21
|
+
set(CMAKE_ADA_EXE_LINK_HELPER "@CMAKE_ADA_EXE_LINK_HELPER@")
|
|
22
|
+
set(CMAKE_ADA_SHARED_LINK_HELPER "@CMAKE_ADA_SHARED_LINK_HELPER@")
|
|
23
|
+
set(CMAKE_ADA_STATIC_LINK_HELPER "@CMAKE_ADA_STATIC_LINK_HELPER@")
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
include(CMakeLanguageInformation)
|
|
2
|
+
|
|
3
|
+
set(CMAKE_ADA_OUTPUT_EXTENSION .o)
|
|
4
|
+
set(CMAKE_ADA_OUTPUT_EXTENSION_REPLACE TRUE)
|
|
5
|
+
|
|
6
|
+
if(CMAKE_USER_MAKE_RULES_OVERRIDE)
|
|
7
|
+
include(${CMAKE_USER_MAKE_RULES_OVERRIDE} RESULT_VARIABLE _override)
|
|
8
|
+
set(CMAKE_USER_MAKE_RULES_OVERRIDE "${_override}")
|
|
9
|
+
endif(CMAKE_USER_MAKE_RULES_OVERRIDE)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
if(CMAKE_USER_MAKE_RULES_OVERRIDE_ADA)
|
|
13
|
+
include(${CMAKE_USER_MAKE_RULES_OVERRIDE_ADA} RESULT_VARIABLE _override)
|
|
14
|
+
set(CMAKE_USER_MAKE_RULES_OVERRIDE_ADA "${_override}")
|
|
15
|
+
endif(CMAKE_USER_MAKE_RULES_OVERRIDE_ADA)
|
|
16
|
+
|
|
17
|
+
set(CMAKE_ADA_FLAGS_INIT "$ENV{ADAFLAGS} ${CMAKE_ADA_FLAGS_INIT}")
|
|
18
|
+
|
|
19
|
+
string(APPEND CMAKE_ADA_FLAGS_INIT " ")
|
|
20
|
+
string(APPEND CMAKE_ADA_FLAGS_DEBUG_INIT " -g")
|
|
21
|
+
string(APPEND CMAKE_ADA_FLAGS_MINSIZEREL_INIT " -Os")
|
|
22
|
+
string(APPEND CMAKE_ADA_FLAGS_RELEASE_INIT " -O3")
|
|
23
|
+
string(APPEND CMAKE_ADA_FLAGS_RELWITHDEBINFO_INIT " -O2 -g")
|
|
24
|
+
|
|
25
|
+
cmake_initialize_per_config_variable(CMAKE_ADA_FLAGS "Flags used by the Ada compiler")
|
|
26
|
+
|
|
27
|
+
if(CMAKE_ADA_STANDARD_LIBRARIES_INIT)
|
|
28
|
+
set(CMAKE_ADA_STANDARD_LIBRARIES
|
|
29
|
+
"${CMAKE_ADA_STANDARD_LIBRARIES_INIT}"
|
|
30
|
+
CACHE
|
|
31
|
+
STRING "Libraries linked by default with all Ada applications.")
|
|
32
|
+
mark_as_advanced(CMAKE_ADA_STANDARD_LIBRARIES)
|
|
33
|
+
endif(CMAKE_ADA_STANDARD_LIBRARIES_INIT)
|
|
34
|
+
|
|
35
|
+
if(NOT CMAKE_ADA_COMPILER_LAUNCHER AND DEFINED ENV{CMAKE_ADA_COMPILER_LAUNCHER})
|
|
36
|
+
set(CMAKE_ADA_COMPILER_LAUNCHER
|
|
37
|
+
"$ENV{CMAKE_ADA_COMPILER_LAUNCHER}"
|
|
38
|
+
CACHE
|
|
39
|
+
STRING "Compiler launcher for Ada.")
|
|
40
|
+
endif(NOT CMAKE_ADA_COMPILER_LAUNCHER AND DEFINED ENV{CMAKE_ADA_COMPILER_LAUNCHER})
|
|
41
|
+
|
|
42
|
+
if(NOT CMAKE_ADA_LINKER_LAUNCHER AND DEFINED ENV{CMAKE_ADA_LINKER_LAUNCHER})
|
|
43
|
+
set(CMAKE_ADA_LINKER_LAUNCHER
|
|
44
|
+
"$ENV{CMAKE_ADA_LINKER_LAUNCHER}"
|
|
45
|
+
CACHE
|
|
46
|
+
STRING "Linker launcher for Ada.")
|
|
47
|
+
endif(NOT CMAKE_ADA_LINKER_LAUNCHER AND DEFINED ENV{CMAKE_ADA_LINKER_LAUNCHER})
|
|
48
|
+
|
|
49
|
+
include(CMakeCommonLanguageInclude)
|
|
50
|
+
_cmake_common_language_platform_flags(ADA)
|
|
51
|
+
|
|
52
|
+
if(NOT CMAKE_ADA_CREATE_SHARED_LIBRARY)
|
|
53
|
+
set(CMAKE_ADA_CREATE_SHARED_LIBRARY
|
|
54
|
+
"${CMAKE_ADA_BINDER_HELPER} <CMAKE_ADA_COMPILER> <OBJECTS> FLAGS <FLAGS> <LINK_FLAGS>"
|
|
55
|
+
"${CMAKE_ADA_SHARED_LINK_HELPER} <CMAKE_ADA_COMPILER> <TARGET> <OBJECTS> <LINK_LIBRARIES>")
|
|
56
|
+
endif(NOT CMAKE_ADA_CREATE_SHARED_LIBRARY)
|
|
57
|
+
|
|
58
|
+
if(NOT CMAKE_ADA_CREATE_STATIC_LIBRARY)
|
|
59
|
+
set(CMAKE_ADA_CREATE_STATIC_LIBRARY
|
|
60
|
+
"${CMAKE_ADA_STATIC_LINK_HELPER} ${CMAKE_AR} <TARGET> <OBJECTS>")
|
|
61
|
+
endif(NOT CMAKE_ADA_CREATE_STATIC_LIBRARY)
|
|
62
|
+
|
|
63
|
+
if(NOT CMAKE_ADA_COMPILE_OBJECT)
|
|
64
|
+
set(CMAKE_ADA_COMPILE_OBJECT
|
|
65
|
+
"${CMAKE_ADA_COMPILER_HELPER} <CMAKE_ADA_COMPILER> <OBJECT_DIR> <SOURCE> <FLAGS>")
|
|
66
|
+
endif(NOT CMAKE_ADA_COMPILE_OBJECT)
|
|
67
|
+
|
|
68
|
+
if(NOT CMAKE_ADA_LINK_EXECUTABLE)
|
|
69
|
+
set(CMAKE_ADA_LINK_EXECUTABLE
|
|
70
|
+
"${CMAKE_ADA_BINDER_HELPER} <CMAKE_ADA_COMPILER> <OBJECTS> FLAGS <FLAGS> <LINK_FLAGS>"
|
|
71
|
+
"${CMAKE_ADA_EXE_LINK_HELPER} <CMAKE_ADA_COMPILER> <TARGET> <FLAGS> <CMAKE_C_LINK_FLAGS> <LINK_FLAGS> OBJ <OBJECTS> LIBS <LINK_LIBRARIES>")
|
|
72
|
+
endif(NOT CMAKE_ADA_LINK_EXECUTABLE)
|
|
73
|
+
|
|
74
|
+
function(ada_add_executable)
|
|
75
|
+
if(ARGC GREATER 1)
|
|
76
|
+
math(EXPR last_index "${ARGC} - 1")
|
|
77
|
+
foreach(source RANGE 1 ${last_index})
|
|
78
|
+
list(APPEND SOURCES ${ARGV${source}})
|
|
79
|
+
string(REPLACE ".adb" "" ali "${ARGV${source}}")
|
|
80
|
+
set(clean_file "CMakeFiles/${ARGV0}.dir/${ali}.ali")
|
|
81
|
+
list(APPEND CLEAN_FILES ${clean_file})
|
|
82
|
+
list(APPEND CLEAN_FILES b~${ali}.adb)
|
|
83
|
+
list(APPEND CLEAN_FILES b~${ali}.ads)
|
|
84
|
+
list(APPEND CLEAN_FILES b~${ali}.ali)
|
|
85
|
+
list(APPEND CLEAN_FILES b~${ali}.o)
|
|
86
|
+
endforeach(source RANGE 1 ${ARGC})
|
|
87
|
+
|
|
88
|
+
add_executable(${ARGV0} ${ARGV1} ${SOURCES})
|
|
89
|
+
|
|
90
|
+
set_target_properties(${ARGV0}
|
|
91
|
+
PROPERTIES
|
|
92
|
+
ADDITIONAL_CLEAN_FILES "${CLEAN_FILES}")
|
|
93
|
+
endif(ARGC GREATER 1)
|
|
94
|
+
endfunction(ada_add_executable)
|
|
95
|
+
|
|
96
|
+
function(ada_add_library)
|
|
97
|
+
if(ARGC GREATER 2)
|
|
98
|
+
math(EXPR last_index "${ARGC} - 1")
|
|
99
|
+
foreach(source RANGE 2 ${last_index})
|
|
100
|
+
list(APPEND SOURCES ${ARGV${source}})
|
|
101
|
+
string(REPLACE ".adb" "" ali "${ARGV${source}}")
|
|
102
|
+
set(clean_file "CMakeFiles/${ARGV0}.dir/${ali}.ali")
|
|
103
|
+
list(APPEND CLEAN_FILES ${clean_file})
|
|
104
|
+
list(APPEND CLEAN_FILES b~${ali}.adb)
|
|
105
|
+
list(APPEND CLEAN_FILES b~${ali}.ads)
|
|
106
|
+
list(APPEND CLEAN_FILES b~${ali}.ali)
|
|
107
|
+
list(APPEND CLEAN_FILES b~${ali}.o)
|
|
108
|
+
endforeach(source RANGE 2 ${ARGC})
|
|
109
|
+
|
|
110
|
+
add_library(${ARGV0} ${ARGV1} ${SOURCES})
|
|
111
|
+
|
|
112
|
+
set_target_properties(${ARGV0}
|
|
113
|
+
PROPERTIES
|
|
114
|
+
ADDITIONAL_CLEAN_FILES "${CLEAN_FILES};dummylib.adb;dummylib.ali;dummylib.o"
|
|
115
|
+
ALI_FLAG "-aO${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${ARGV0}.dir/")
|
|
116
|
+
endif(ARGC GREATER 2)
|
|
117
|
+
endfunction(ada_add_library)
|
|
118
|
+
|
|
119
|
+
function(ada_find_ali)
|
|
120
|
+
get_target_property(link_libs ${ARGV0} LINK_LIBRARIES)
|
|
121
|
+
|
|
122
|
+
foreach(lib IN LISTS link_libs)
|
|
123
|
+
get_target_property(ali ${lib} ALI_FLAG)
|
|
124
|
+
string(APPEND FLAGS ${ali} " ")
|
|
125
|
+
unset(ali)
|
|
126
|
+
endforeach(lib IN LISTS link_libs)
|
|
127
|
+
|
|
128
|
+
set_target_properties(${ARGV0}
|
|
129
|
+
PROPERTIES
|
|
130
|
+
LINK_FLAGS ${FLAGS})
|
|
131
|
+
endfunction(ada_find_ali)
|
|
132
|
+
|
|
133
|
+
set(CMAKE_ADA_INFORMATION_LOADED TRUE)
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
include(${CMAKE_ROOT}/Modules/CMakeDetermineCompiler.cmake)
|
|
2
|
+
|
|
3
|
+
# Load system-specific compiler preferences for this language.
|
|
4
|
+
include(Platform/${CMAKE_SYSTEM_NAME}-Determine-Ada OPTIONAL)
|
|
5
|
+
include(Platform/${CMAKE_SYSTEM_NAME}-Ada OPTIONAL)
|
|
6
|
+
|
|
7
|
+
if(NOT CMAKE_ADA_COMPILER_NAMES)
|
|
8
|
+
set(CMAKE_ADA_COMPILER_NAMES gnat)
|
|
9
|
+
|
|
10
|
+
foreach(ver RANGE 11 99)
|
|
11
|
+
list(APPEND CMAKE_ADA_COMPILER_NAMES gnat-${ver})
|
|
12
|
+
endforeach(ver RANGE 11 99)
|
|
13
|
+
endif(NOT CMAKE_ADA_COMPILER_NAMES)
|
|
14
|
+
|
|
15
|
+
if(NOT CMAKE_ADA_COMPILER)
|
|
16
|
+
set(CMAKE_ADA_COMPILER_INIT NOTFOUND)
|
|
17
|
+
_cmake_find_compiler(ADA)
|
|
18
|
+
else(NOT CMAKE_REAL_ADA_COMPILER)
|
|
19
|
+
_cmake_find_compiler_path(ADA)
|
|
20
|
+
endif(NOT CMAKE_ADA_COMPILER)
|
|
21
|
+
|
|
22
|
+
mark_as_advanced(CMAKE_ADA_COMPILER)
|
|
23
|
+
set(CMAKE_ADA_COMPILER_ID "GNU")
|
|
24
|
+
set(CMAKE_ADA_BINDER_HELPER "${CMAKE_COMMAND} -P ${CMAKE_CURRENT_SOURCE_DIR}/cmake/binder_helper.cmake")
|
|
25
|
+
set(CMAKE_ADA_COMPILER_HELPER "${CMAKE_COMMAND} -P ${CMAKE_CURRENT_SOURCE_DIR}/cmake/compile_helper.cmake")
|
|
26
|
+
set(CMAKE_ADA_EXE_LINK_HELPER "${CMAKE_COMMAND} -P ${CMAKE_CURRENT_SOURCE_DIR}/cmake/exe_link_helper.cmake")
|
|
27
|
+
set(CMAKE_ADA_SHARED_LINK_HELPER "${CMAKE_COMMAND} -P ${CMAKE_CURRENT_SOURCE_DIR}/cmake/shared_link_helper.cmake")
|
|
28
|
+
set(CMAKE_ADA_STATIC_LINK_HELPER "${CMAKE_COMMAND} -P ${CMAKE_CURRENT_SOURCE_DIR}/cmake/static_link_helper.cmake")
|
|
29
|
+
|
|
30
|
+
configure_file(
|
|
31
|
+
${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules/CMakeADACompiler.cmake.in
|
|
32
|
+
${CMAKE_PLATFORM_INFO_DIR}/CMakeADACompiler.cmake
|
|
33
|
+
@ONLY)
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
include(CMakeTestCompilerCommon)
|
|
2
|
+
unset(CMAKE_ADA_COMPILER_WORKS CACHE)
|
|
3
|
+
|
|
4
|
+
if(NOT CMAKE_ADA_COMPILER_WORKS)
|
|
5
|
+
PrintTestCompilerStatus("ADA" "")
|
|
6
|
+
set(_ADA_TEST_FILE "${CMAKE_BINARY_DIR}/${CMAKE_FILES_DIRECTORY}/CMakeTmp/main.adb")
|
|
7
|
+
|
|
8
|
+
file(WRITE ${_ADA_TEST_FILE}
|
|
9
|
+
"with Ada.Text_IO; use Ada.Text_IO;\n"
|
|
10
|
+
"\n"
|
|
11
|
+
"procedure main is\n"
|
|
12
|
+
"begin\n"
|
|
13
|
+
"Put_Line(\"Hello, World!\");\n"
|
|
14
|
+
"end Main;\n")
|
|
15
|
+
|
|
16
|
+
try_compile(CMAKE_ADA_COMPILER_WORKS ${CMAKE_BINARY_DIR}
|
|
17
|
+
${_ADA_TEST_FILE}
|
|
18
|
+
OUTPUT_VARIABLE __CMAKE_ADA_COMPILER_OUTPUT)
|
|
19
|
+
|
|
20
|
+
set(CMAKE_ADA_COMPILER_WORKS ${CMAKE_ADA_COMPILER_WORKS})
|
|
21
|
+
unset(CMAKE_ADA_COMPILER_WORKS CACHE)
|
|
22
|
+
set(ADA_TEST_WAS_RUN TRUE)
|
|
23
|
+
endif(NOT CMAKE_ADA_COMPILER_WORKS)
|
|
24
|
+
|
|
25
|
+
if(NOT CMAKE_ADA_COMPILER_WORKS)
|
|
26
|
+
PrintTestCompilerStatus("ADA" " -- broken")
|
|
27
|
+
|
|
28
|
+
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
|
|
29
|
+
"Determining if the Ada compiler works failed with "
|
|
30
|
+
"the following output:\n${__CMAKE_ADA_COMPILER_OUTPUT}\n\n")
|
|
31
|
+
|
|
32
|
+
message(FATAL_ERROR "The Ada compiler \"${CMAKE_ADA_COMPILER}\" "
|
|
33
|
+
"is not able to compile a simple test program.\nIt fails "
|
|
34
|
+
"with the following output:\n ${__CMAKE_ADA_COMPILER_OUTPUT}\n\n"
|
|
35
|
+
"CMake will not be able to correctly generate this project.")
|
|
36
|
+
else(NOT CMAKE_ADA_COMPILER_WORKS)
|
|
37
|
+
if(ADA_TEST_WAS_RUN)
|
|
38
|
+
PrintTestCompilerStatus("ADA" " -- works")
|
|
39
|
+
|
|
40
|
+
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
|
|
41
|
+
"Determining if the Ada compiler works passed with "
|
|
42
|
+
"the following output:\n${__CMAKE_ADA_COMPILER_OUTPUT}\n\n")
|
|
43
|
+
endif(ADA_TEST_WAS_RUN)
|
|
44
|
+
endif(NOT CMAKE_ADA_COMPILER_WORKS)
|
|
45
|
+
|
|
46
|
+
unset(__CMAKE_ADA_COMPILER_OUTPUT)
|